brave / ads-ui

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

Production Release 2024-03-07 #1114

Closed IanKrieger closed 6 months ago

IanKrieger commented 6 months ago

Features

Chores

github-actions[bot] commented 6 months ago

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

Description

This PR introduces several key changes to enhance the registration and validation processes for Brave Ads campaigns, specifically related to search ads. It also updates dependencies, refactors certain components for code cleanliness, and implements new security updates.

Changes ### Changes #### Updated Dependencies - `.github/workflows/codeql-analysis.yml`: Updated CodeQL actions to version `v3.24.6` for improved security scanning. #### Improved Registration Process - `src/auth/registration/types.ts`: Updated the `RegistrationForm` type to include new fields such as `country`, `mediaSpend`, and `domain` to better support search ads registration. - `src/auth/registration/AccountChoice.tsx`: Introduced two options for campaign types - "Browser ads" and "Search ads", and provided links to learn more about each campaign type. - `src/auth/registration/BrowserForm.tsx` and `src/auth/registration/SearchForm.tsx`: Created separate forms for browser and search ads registration, including specific fields relevant to each type. - `src/auth/registration/Register.tsx`: Implemented a switch case to handle different registration paths for browser and search ads, using React Router. - `src/auth/registration/RegistrationContainer.tsx` and `src/auth/registration/AdvertiserRegistered.tsx`: Introduced new components for a cleaner registration process display, including success messaging. - `src/validation/RegistrationSchema.tsx` and `src/validation/UserSchema.tsx`: Added validation schemas for the registration form, ensuring data integrity and matching domains for search ads. #### Security and Cleanup - `src/components/Creatives/NewsPreview.tsx` and `src/user/ads/NotificationAd.tsx`: Minor UI adjustments including messaging about including brand names in ads to prevent rejections. - Deleted `src/search/SearchLandingPage.tsx` and `src/search/SearchTalkingPoints.tsx`: Removed unused components to clean up the codebase. - Enhanced `src/locales/` translations for the newly added messages and form fields. #### Test and Configuration Updates - Added tests for new validation logic in `src/validation/RegistrationSchema.test.ts`. - Updated `.test.ts` files to conform with the new campaign registration structure and fields.

Security Hotspots