[Mobile] Checks theme colors for validity and fallbacks to defaults#25440
[Mobile] Checks theme colors for validity and fallbacks to defaults#25440
Conversation
|
Size Change: +94 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
chipsnyder
left a comment
There was a problem hiding this comment.
Using Maywood I wasn't able to recreate this issue but overall the fix looks good just left a couple smaller suggestions
| import { getTranslation } from '../i18n-cache'; | ||
| import initialHtml from './initial-html'; | ||
| import setupApiFetch from './api-fetch-setup'; | ||
| import { SETTINGS_DEFAULTS } from '../../block-editor/src/store/defaults.js'; |
There was a problem hiding this comment.
Hey @antonis, for imports from another module we usually would import SETTINGS_DEFAULTS like what's below.
| import { SETTINGS_DEFAULTS } from '../../block-editor/src/store/defaults.js'; | |
| import { SETTINGS_DEFAULTS } from '@wordpress/block-editor'; |
| gradients = validGradients; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
This looks good overall. Since it's the same code in both places I wonder if we would be better off creating a helper that both modules could use. Maybe a function in the block-editor component as both spots reference that already
f04670f to
006cf34
Compare
|
Converted to DRAFT till we figure out how to handle the removal of default colors with #25419 |
This seems to be ok on CI. Probably something is wrong in my local setup. |
|
@antonis could you try running |
chipsnyder
left a comment
There was a problem hiding this comment.
LGTM! I tested with the suggested theme and everything worked well 🚀
Fixes wordpress-mobile/gutenberg-mobile#2635
Gutenberg Mobile PR-> wordpress-mobile/gutenberg-mobile#2639Description
How has this been tested?
Broken theme
Normal theme
Types of changes
Bug fix
Checklist: