brave / ads-ui

Self-service ads UI
Mozilla Public License 2.0
24 stars 11 forks source link

feat: remove legacy report view #1233

Closed IanKrieger closed 3 months ago

IanKrieger commented 3 months ago

Removes legacy reporting view and related code

github-actions[bot] commented 3 months ago

[puLL-Merge] - brave/ads-ui@1233

Here is the code review for the provided PR diff:

Description

This PR removes several components and routes related to the original campaign reporting view and refactors the code to use the new reporting view across all campaign formats. It also removes some unused analytics components.

Changes ### Changes - Removes `src/components/Collapse/ChangeReportingAlert.tsx` which displayed an alert about the updated reporting view - Removes `src/components/Collapse/CollapseBox.tsx` which was a collapsible section used in the original reporting view - Updates `src/components/Datagrid/renderers.tsx` to remove usage of the `CampaignExtras` type - Updates `src/routes/campaigns/analytics/CampaignAnalytics.tsx`: - Removes display of `ChangeReportingAlert` for non-search campaigns - Removes passing of `CampaignFormat` to determine display - Updates routes in `src/user/User.tsx`: - Changes `/user/main/campaign/:campaignId` route to redirect to `/user/main/report/:campaignId` - Removes duplicate `/user/main/report/:campaignId` route - Removes `src/user/adSet/AdSetList.tsx` which displayed the list of ad sets in the original reporting view - Removes `src/user/ads/AdList.tsx` which displayed the list of ads in the original reporting view - Removes several components under `src/user/analytics/analyticsOverview/components/*` which were used for the original reporting metrics and charts - Removes `src/user/analytics/analyticsOverview/lib/*` containing library code for original reporting - Removes `src/user/analytics/analyticsOverview/reports/*` containing the original engagement and OS reporting sections - Removes `src/user/analytics/analyticsOverview/types/index.ts` containing types for original reporting - Removes `src/user/analytics/renderers/index.tsx` containing cell renderers for original reporting stats - Removes `src/user/views/user/AdDetailTable.tsx` which was the table component for displaying ad set and ad details - Removes `src/user/views/user/CampaignDetails.tsx` which contained tabs for ad set and ad lists - Updates `src/user/views/user/CampaignReportViewSelector.tsx`: - Removes logic for selecting between original and new reporting view - Always displays `AnalyticsOverview` except for NTP-SI format - Removes `src/user/views/user/reports/OriginalCampaignReportView.tsx` which was the top-level component for the original reporting view

Security Hotspots

This PR does not appear to introduce any clear security vulnerabilities. The main changes are removing unused code and consolidating to use the new reporting view.