brave / ads-ui

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

Production Release 2024-08-05 #1294

Closed IanKrieger closed 1 month ago

IanKrieger commented 1 month ago

Features

Fixes

Chores

github-actions[bot] commented 1 month ago

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

Description

This PR makes significant changes to the campaign management functionality in the Brave Ads UI. It updates the data model for ad sets and conversions, modifies GraphQL queries and mutations, and adjusts the UI components accordingly. The changes appear to be aimed at simplifying the campaign structure and improving the user experience for managing campaigns.

Changes ### Changes 1. src/components/Conversion/ConversionDisplay.tsx: - Updated to handle a single conversion object instead of an array. 2. src/components/Location/LocationPicker.tsx: - Added filtering to exclude "OTHER" geocode. - Made the component disabled when not in draft mode. 3. src/components/Segment/SegmentPicker.tsx: - Removed special handling for "Untargeted" segment. - Updated logic for setting segment values. 4. src/graphql-client/gql.ts and src/graphql-client/graphql.ts: - Updated GraphQL queries and types to reflect changes in the API. - Added new mutations for updating current user and campaigns. 5. src/user/ads/NewAd.tsx: - Added a "create now" caption to the new ad button. 6. src/user/library/index.ts: - Updated transformNewForm and transformEditForm functions to handle the new data structure. - Modified how conversions are handled in the form data. 7. src/user/settings/UserForm.tsx: - Updated to use the new UpdateCurrentUser mutation. 8. src/user/views/adsManager/types/index.ts: - Changed AdSetForm to have a single 'conversion' field instead of an array of 'conversions'. - Removed 'creativeInstanceId' from Creative type. 9. src/user/views/adsManager/views/advanced/components/adSet/fields/ConversionField.tsx: - Updated to handle a single conversion object instead of an array. 10. src/user/views/adsManager/views/advanced/components/campaign/CampaignSettings.tsx: - Removed the check for isDraft before rendering LocationPicker. 11. src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx: - Updated to use the new AdsManagerUpdateCampaign mutation. 12. src/user/views/adsManager/views/advanced/components/review/Review.tsx: - Removed the effect that was setting all form fields as touched. 13. src/user/views/user/CampaignView.tsx and src/user/views/user/ConversionAlert.tsx: - Removed the ConversionAlert component and its usage. 14. src/util/segment.ts: - Removed special handling for "Untargeted" segment name. 15. src/validation/CampaignSchema.tsx: - Updated the validation schema to handle a single conversion object instead of an array.

Possible Issues

  1. The removal of the ConversionAlert might impact users who were relying on that information. Ensure that this change has been communicated properly to users.

  2. The changes to segment handling (removal of "Untargeted" special case) might affect existing campaigns or reports. Verify that this doesn't break any existing functionality or reporting.

  3. The modification of the conversion handling from an array to a single object might require data migration for existing campaigns.

Security Hotspots

No significant security issues were identified in this change. However, as always, ensure that proper input validation is maintained, especially for user-provided URLs in conversion tracking.