-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finalize TwG setting validation #5524
Comments
IB ✔️ |
@techanvil fyi I have added a note to write jest tests for the validation function. |
Nice one @eugene-manuilov! |
QA Update:
|
Good catch! Thanks, @kuasha420. Added a follow up PR that fixes it: #5610. |
@wpdarren UI changes in the settings view component are out of scope for this ticket. The intention here is to make sure that the colour setting shows up on the settings view now. |
QA Update: ✅Verified:
|
Follow-up to #5461: We need to allow for all possible color themes to be selectable within the client-side TwG setting validation.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
colorTheme
setting should be enhanced to allow for any of the identifiers from the above list of colors to be chosen (instead of the currently hard-coded "blue").SettingsView
UI should also be adjusted accordingly to show human-readable color names: For displaying thecolorTheme
value, it should no longer just display the identifier, but rather the human-readable name for the identifier set.Implementation Brief
Note: Before you begin implementation, make sure the color list and names are finalized (see this Figma comment).
In
assets/js/modules/thank-with-google/util/settings.js
:getColorThemes
.colorThemeID
,name
, andsvg
.blue
, name: Bluecyan
, name: Cyangreen
, name: Greenpurple
, name: Purplepink
, name: Pinkorange
, name: Orangebrown
, name: Brownblack
, name: BlackIn
assets/js/modules/thank-with-google/util/validation.js
:isValidColorTheme
function to retrieve the list of themes from the newgetColorThemes
function and ensure the passedcolorTheme
matches acolorThemeID
in the list of objects.In
assets/js/modules/thank-with-google/components/settings/SettingsView.js
:getColorThemes
and use this for rendering the color theme options.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: