-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add dark black header and footer variation #307
Changes from all commits
51e63d1
c91fa86
80a6d29
129155f
c053aa6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,9 +13,10 @@ import { useBlockProps } from '@wordpress/block-editor'; | |||||
import metadata from './block.json'; | ||||||
|
||||||
const variations = [ | ||||||
{ label: __( 'White on black (default)', 'wporg' ), value: 'white-on-black' }, | ||||||
{ label: __( 'White on charcoal-1', 'wporg' ), value: 'white-on-dark-black' }, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nothing is using this value yet, correct? So it's not too late to try to improve the naming? For me the range of values is where it's going to get messy if/when we add more variations...
Suggested change
Also I wonder if it's still manageable to migrate the existing usages to new values while we are still relatively early in the overall redesign. All the pages are saved as patterns in source control in the various repos, so we could replace eg. Or maybe I'm worrying too much about this... feel free to give me a reality check 😂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usages are even better for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adamwoodnz Perhaps for a migration strategy we could do the following:
What do you think? I'm going to hold off until we find out whether we are going to use charcoal-1 or charcoal-2, but I think it's a good idea to implement someday. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I was a bit hesitant to suggest we reuse the same color. I think that makes sense for simplicity's sake. Having both values in the switch could work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would a deprecation work? It might only apply to JS blocks. If so, I think the proposed migration strategy sounds good. |
||||||
{ label: __( 'White on charcoal-2 (default)', 'wporg' ), value: 'white-on-black' }, | ||||||
{ label: __( 'White on blueberry-1', 'wporg' ), value: 'white-on-blue' }, | ||||||
{ label: __( 'Black on white', 'wporg' ), value: 'black-on-white' }, | ||||||
{ label: __( 'White on blue', 'wporg' ), value: 'white-on-blue' }, | ||||||
]; | ||||||
|
||||||
const Edit = ( { attributes } ) => ( | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than changing this, you can add another "case" to
_common.pcss
to override--wp-global-header--background-color
. See how it's done for the other styles here:wporg-mu-plugins/mu-plugins/blocks/global-header-footer/postcss/_common.pcss
Lines 67 to 90 in 2ca5e5b