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

Remove Gutenberg CSS classes and adjust CSS accordingly. #12498

Merged
merged 1 commit into from
Mar 22, 2019

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Mar 21, 2019

Summary

This PR can be summarized in the following changelog entry:

  • Fix the buttons position in the structured data blocks.

Relevant technical choices:

  • Gutenberg moved some components from editor to block-editor
  • as a consequence, also some Gutenberg CSS classes have now different names e.g. editor-inserter__toggle became block-editor-inserter__toggle
  • we shouldn't use Gutenberg CSS class names in our components to start with, as they're not part of a formalized API (or so they dixit)
  • this PR removes any usage of editor-inserter__toggle
  • removes components-icon-button from the JS, though it's still used in our stylesheet
  • changes the "Add total time" Button component to IconButton: this was a hack made necessary by the IconButton lack of support for refs. So we used a Button and manually added the CSS class components-icon-button. Since Make IconButton able to be referenced. WordPress/gutenberg#14163, IconButton now is able to get a ref thus we can use an IconButton

Test instructions

  • activate the Gutenberg plugin, at the moment latest master is 5.3.0 WordPress/gutenberg@95642a4
  • create a post
  • add a How-to block with some steps
  • add a FAQ block with some QA
  • check all the buttons are properly positioned
    • How-to: Add total time
    • both blocks: Add Image, Delete, Insert, and the "Add step / question" at the bottom
  • press the How-to "Add total time" button using the keyboard
  • tab to the "Delete total time" trash icon button and press it
  • verify focus is moved back to the "Add total time" button

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Fixes #12496

@hwinne
Copy link
Contributor

hwinne commented Mar 22, 2019

CR Done 👍

@johannadevos johannadevos self-assigned this Mar 22, 2019
@johannadevos
Copy link
Contributor

Acceptance 👍

@johannadevos johannadevos merged commit 69f652c into trunk Mar 22, 2019
@johannadevos johannadevos added this to the 10.2 milestone Mar 22, 2019
@johannadevos johannadevos deleted the 12496-structured-data-blocks-css-classes branch March 22, 2019 09:28
@johannadevos johannadevos removed their assignment Mar 22, 2019
@moorscode moorscode modified the milestones: 11.0, 11.1 Apr 11, 2019
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.

4 participants