Skip to content
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

BBT-7 Convert css vars to hex value #14

Closed
wants to merge 8 commits into from

Conversation

balw
Copy link
Contributor

@balw balw commented Jul 12, 2023

BBT-7

Converts CSS vars to hex values to be used in the colour components.

I've also brought in the block editor context as it was needed to get the colour pallets. Might want to bring this up for discussion how we do this as I assume it will be needed else where around the plugin.

Screenshots/Videos

http://bigbite.im/v/no4Fqn

Copy link
Member

@g-elwell g-elwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a few comments, but I'm also interested in whether this way of getting context is reliable and not going to cause any conflicts? I know you've said it's probably something we need to discuss...

I also know that we've literally just taken a similar approach for pulling in CSS styles via PHP, so our hands may be tied due to gutenberg not having the APIs available for us to utilise this information, but just checking how much you've looked into the react context approach at this point?

} from '@wordpress/block-editor';

const ColorControl = ( { value, onChange } ) => {
wp.data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use import { dispatch } from "@wordpress/data" here

* Get the editor settings
*/
public function get_themer_editor_settings() {
$block_editor_context = new \WP_Block_Editor_Context( array() );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a convo on class usage on #13, based on that can you please change this to import the class at the top of the file and we can lose the \? Thanks!

@g-elwell g-elwell changed the base branch from main to release/1.0.0 July 17, 2023 14:36
@balw
Copy link
Contributor Author

balw commented Jul 18, 2023

Made a few comments, but I'm also interested in whether this way of getting context is reliable and not going to cause any conflicts? I know you've said it's probably something we need to discuss...

I also know that we've literally just taken a similar approach for pulling in CSS styles via PHP, so our hands may be tied due to gutenberg not having the APIs available for us to utilise this information, but just checking how much you've looked into the react context approach at this point?

I've not had a huge look into this but I should have some time to have a further look into it. @chrishbite Had suggested this way to me so not sure if he has anymore insight into this.

@balw balw requested a review from g-elwell August 29, 2023 09:28
@spbuckle
Copy link
Contributor

This ticket is being closed due to its implementation not being compatible with the current refactor of the plugin. It's functionality will be included as part of this ticket: https://b5ecom.atlassian.net/browse/BBT-89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants