Skip to content

Commit

Permalink
Merge pull request #1226 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-06-07
  • Loading branch information
IanKrieger authored Jun 7, 2024
2 parents e6c3550 + 73bcd66 commit 8f06673
Show file tree
Hide file tree
Showing 11 changed files with 204 additions and 235 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.13.1
20.14.0
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
"@fontsource/inter": "5.0.18",
"@fontsource/mulish": "5.0.18",
"@fontsource/poppins": "5.0.14",
"@graphql-typed-document-node/core": "^3.2.0",
"@graphql-typed-document-node/core": "3.2.0",
"@jonkoops/matomo-tracker-react": "0.7.0",
"@lingui/conf": "^4.11.1",
"@lingui/core": "4.11.0",
"@lingui/detect-locale": "4.11.0",
"@lingui/macro": "4.11.0",
"@lingui/react": "4.11.0",
"@mui/icons-material": "5.15.18",
"@lingui/conf": "4.11.1",
"@lingui/core": "4.11.1",
"@lingui/detect-locale": "4.11.1",
"@lingui/macro": "4.11.1",
"@lingui/react": "4.11.1",
"@mui/icons-material": "5.15.19",
"@mui/lab": "5.0.0-alpha.170",
"@mui/material": "5.15.18",
"@mui/x-data-grid": "7.5.1",
"@mui/x-date-pickers": "7.5.1",
"@mui/material": "5.15.19",
"@mui/x-data-grid": "7.6.1",
"@mui/x-date-pickers": "7.6.1",
"bignumber.js": "9.1.2",
"dayjs": "1.11.11",
"formik": "2.4.6",
Expand Down Expand Up @@ -63,8 +63,8 @@
"@graphql-codegen/client-preset": "4.2.6",
"@graphql-codegen/introspection": "4.0.3",
"@graphql-eslint/eslint-plugin": "3.20.1",
"@lingui/cli": "4.11.0",
"@lingui/vite-plugin": "4.11.0",
"@lingui/cli": "4.11.1",
"@lingui/vite-plugin": "4.11.1",
"@parcel/watcher": "2.4.1",
"@types/lodash": "4.17.4",
"@types/papaparse": "5.3.14",
Expand All @@ -78,16 +78,16 @@
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-lingui": "0.3.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react": "7.34.2",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.0.11",
"knip": "5.16.0",
"lint-staged": "15.2.4",
"knip": "5.17.3",
"lint-staged": "15.2.5",
"npm-run-all2": "6.2.0",
"prettier": "3.2.5",
"typescript": "5.4.5",
"typescript-eslint": "7.10.0",
"vite": "5.2.11",
"typescript-eslint": "7.11.0",
"vite": "5.2.12",
"vite-plugin-checker": "0.6.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.6.0"
Expand Down
377 changes: 170 additions & 207 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/routes/campaigns/analytics/AnalyticsOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { FullScreenProgress } from "@/components/FullScreenProgress";
import { Trans } from "@lingui/macro";
import { CampaignAnalytics } from "@/routes/campaigns/analytics/CampaignAnalytics";
import { CampaignOverviewProps } from "@/util/CampaignIdProps";
import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo";

Highcharts.setOptions({
lang: {
Expand All @@ -14,6 +15,7 @@ Highcharts.setOptions({
});

export function AnalyticsOverview({ campaignOverview }: CampaignOverviewProps) {
useTrackMatomoPageView({ documentTitle: "Campaign Report View: V2" });
const campaignStartDate = dayjs(campaignOverview.startAt);
const campaignStartFromNow = campaignStartDate.fromNow();

Expand Down
3 changes: 2 additions & 1 deletion src/routes/campaigns/analytics/breakdowns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ const ADSET_BREAKDOWN: BreakdownDefinitionWithQuery<
label: msg`Ad Set`,
query: AdSet_Breakdown_Load,
extractId: (dims) => dims.adSet?.id ?? "",
extractName: (dims) => dims.adSet?.name ?? "",
extractName: (dims) =>
dims.adSet?.name || dims.adSet?.id.substring(0, 8) || "?",
renderCell: (row) => row.name,
};

Expand Down
5 changes: 1 addition & 4 deletions src/routes/campaigns/analytics/filters/BreakdownSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import { useLingui } from "@lingui/react";
import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab";
import Box from "@mui/material/Box";
import { useState } from "react";

export function VerticalBreakdown() {
const { _ } = useLingui();
const [value, setValue] = useState(0);
const { selected, setSelected, forceDefaultBreakdownSelection } =
useBreakdownParams();
const breakdowns = BREAKDOWNS.map((item) => ({
Expand All @@ -32,9 +30,8 @@ export function VerticalBreakdown() {
>
<Tabs
orientation="vertical"
value={value}
value={breakdowns.findIndex((b) => b.id === selected.id)}
onChange={(e, nv) => {
setValue(nv);
setSelected(breakdowns[nv]);
}}
sx={{ alignItems: "left" }}
Expand Down
2 changes: 0 additions & 2 deletions src/user/views/user/CampaignReportViewSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, LinearProgress } from "@mui/material";
import { AlwaysOnFormButton } from "@/components/Button/AlwaysOnFormButton";
import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo";
import { useParams, useRouteMatch } from "react-router-dom";
import { CampaignFormat } from "@/graphql-client/graphql";
import { ConsultAccountManager } from "./reports/ConsultAccountManager";
Expand Down Expand Up @@ -39,7 +38,6 @@ const Campaign_Load = graphql(`

export function CampaignReportViewSelector() {
const match = useRouteMatch();
useTrackMatomoPageView({ documentTitle: "Campaign Reporting" });
const isReport = match.url.includes("report");

const { campaignId } = useParams<Params>();
Expand Down
3 changes: 3 additions & 0 deletions src/user/views/user/reports/ConsultAccountManager.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Alert } from "@mui/material";
import { Trans } from "@lingui/macro";
import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo";

export function ConsultAccountManager() {
useTrackMatomoPageView({ documentTitle: "Consult Account Manager" });

return (
<Alert
severity="info"
Expand Down
2 changes: 2 additions & 0 deletions src/user/views/user/reports/OriginalCampaignReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ import {
} from "@/graphql-client/graphql";
import dayjs, { Dayjs } from "dayjs";
import { useQuery } from "@apollo/client";
import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo";

interface Props {
campaignSummary: CampaignSummaryFragment;
}

export function OriginalCampaignReportView({ campaignSummary }: Props) {
useTrackMatomoPageView({ documentTitle: "Campaign Report View" });
const { _ } = useLingui();
const today = new Date();
const [startDate, setStartDate] = useState<Dayjs | undefined>();
Expand Down
3 changes: 3 additions & 0 deletions src/user/views/user/reports/SearchCampaignReportView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ import { useMetricSelection } from "@/user/analytics/search/hooks";
import { ReportMenu } from "@/user/reporting/ReportMenu";
import dayjs from "dayjs";
import { useQuery } from "@apollo/client";
import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo";

interface Props {
campaignSummary: CampaignSummaryFragment;
}

export function SearchCampaignReportView({ campaignSummary }: Props) {
useTrackMatomoPageView({ documentTitle: "Search Campaign Report View" });

const { forceDefaultMetricSelection } = useMetricSelection();
const [isFirstLoad, setIsFirstLoad] = useState(true);

Expand Down

0 comments on commit 8f06673

Please sign in to comment.