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

Blocks: Remove obsolete isSelected usage (part 3) #6280

Merged
merged 1 commit into from
Apr 20, 2018

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Apr 19, 2018

Description

Closes #5633.

Follow up for #5029, #6201 and #6248.

isSelected usage is no longer mandatory with BlockControls, InspectorControls and RichText. It's now handled by the editor internally to ensure that controls are visible only when the block is selected.

Refactored blocks:

  • Preformatted
  • Pullquote
  • Quote
  • Tabel
  • Text columns
  • Subhead
  • Verse
  • Video

This covers all core blocks 🎉

When updating Text columns block I also fixed the following issue reported in #5633:

The Text Columns block allows to create text over N columns. When creating a Text Columns block with 3 columns, and you attempt to change the formatting of the text in one column (i.e. add a link, make bold, etc), the text formatting toolbar appears 3 times. Furthermore, when adding a link, the "add link" popup will appear three times. This issue also scales, so when creating 5 columns, the formatting toolbar will show 5 times
4 - 4col toolbar

It should be much easier to review this diff without whitespace changes:

https://github.com/WordPress/gutenberg/pull/6280/files?w=1

How has this been tested?

Manually, unit tests and e2e tests.

Types of changes

Refactoring, no visual changes.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@gziolo gziolo added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Apr 19, 2018
@gziolo gziolo added this to the 2.8 milestone Apr 19, 2018
@gziolo gziolo self-assigned this Apr 19, 2018
@gziolo gziolo requested a review from a team April 19, 2018 11:24
@gziolo gziolo force-pushed the update/is-selected-part-3 branch from aff2f73 to d214448 Compare April 19, 2018 13:54
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

Changes here look good to me 👍 I did a set of smoke tests in all the changed blocks and I did not noticed regressions :)

@gziolo gziolo merged commit cb1b92e into master Apr 20, 2018
@gziolo gziolo deleted the update/is-selected-part-3 branch April 20, 2018 08:11
nuzzio pushed a commit to nuzzio/gutenberg that referenced this pull request Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text columns formating toolbar repeats
2 participants