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 1) #6201

Merged
merged 1 commit into from Apr 16, 2018

Conversation

Projects
None yet
2 participants
@gziolo
Member

gziolo commented Apr 16, 2018

Description

Follow up for #5029.

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:

  • Audio
  • Button
  • Categories
  • Columns
  • Cover Image
  • Embed
  • Gallery
  • HTML
  • List
  • More

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

https://github.com/WordPress/gutenberg/pull/6201/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 self-assigned this Apr 16, 2018

@gziolo gziolo added this to the 2.7 milestone Apr 16, 2018

@youknowriad

I like that this brings some consistency to block edit functions (returning fragments)

@gziolo

This comment has been minimized.

Member

gziolo commented Apr 16, 2018

Columns block has this issue, which also exists in the master branch. It is reported in #5633:

screen shot 2018-04-16 at 13 20 51

I will fix it in separated PR since touching this code :)

@youknowriad

This comment has been minimized.

Contributor

youknowriad commented Apr 16, 2018

I guess we should officially deprecate the Text columns block

@gziolo

This comment has been minimized.

Member

gziolo commented Apr 16, 2018

I guess we should officially deprecate the Text columns block

It would solve this issue, too :)

@gziolo gziolo merged commit 1ee2813 into master Apr 16, 2018

2 checks passed

codecov/project 44.35% (+0.05%) compared to faabea1
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the update/blocks-is-selected-a-g branch Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment