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

Inserter: In text label mode, use "Close" label when inserter is open. #33534

Merged

Conversation

getsource
Copy link
Member

@getsource getsource commented Jul 19, 2021

Description

In text label mode, changes inserter label from "Add" to "Close" when the inserter is opened.

Initial review props @Mamaduka.
Fixes: #33397

How has this been tested?

Using wp-env:

  • In Options -> Preferences -> Appearance, enable "Display Button Labels"
  • Click "Add" to open Inserter
  • Notice that "Add" changes to "Close"
  • Click "Close" to close Inserter
  • Notice that "Close" changes back to "Add"

Also, ran npm run test locally.

Screenshots

Before is visible in #33397

After (Narrow Viewport, like I assume was the case in the original issue -- only shows Add):

Screen.Recording.2021-07-19.at.16.19.46.mov

After (Wide Viewport -- shows all buttons):

Screen.Recording.2021-07-19.at.16.23.10.mov

Types of changes

Enhancement

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@getsource getsource added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Inserter The main way to insert blocks using the + button in the editing interface General Interface Parts of the UI which don't fall neatly under other labels. labels Jul 19, 2021
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks!

@ntsekouras
Copy link
Contributor

Actually I'm seeing this:
Screenshot 2021-07-19 at 11 24 39 AM

Let's check this a bit better before landing

@getsource getsource merged commit ec922be into WordPress:trunk Jul 19, 2021
@getsource getsource deleted the update/close-label-for-inserter/33397 branch July 19, 2021 12:00
@github-actions github-actions bot added this to the Gutenberg 11.2 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). General Interface Parts of the UI which don't fall neatly under other labels. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Block Inserter text label to indicate how to close
2 participants