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

Navigation Block: use RichText for navigation menu item instead of TextControl. #18182

Merged
merged 5 commits into from Oct 31, 2019

Conversation

@mtias
Copy link
Contributor

mtias commented Oct 30, 2019

Navigation menu items should not be using a plain text control for labels. It should leverage RichText which is setup to handle a visually faithful representation and smooth transition between editing and viewing. (You'll notice no visual jump when selecting the item.)

It also allows to add a placeholder property, which is useful to address #18180.

Fixes #18180.

image

To Do:

  • Restore color tools.
  • Fix display of inline movers and clean up classes.
The label should be immediately editable, with no layout jump.
It should also offer some of the rich text options and exclude
interactive formatting options.

It also adds placeholder text to empty menu items for clarity.
@draganescu

This comment has been minimized.

Copy link
Contributor

draganescu commented Oct 30, 2019

RichText offers a toolbar which I don't think we want on the menu item:

Screenshot 2019-10-30 at 14 34 11

or do we?

renames a class to be more clear
Copy link
Contributor

draganescu left a comment

using the RichText component feels a lot smoother in the content of the editor

@noisysocks noisysocks added this to 👀 PRs to review in Navigation block via automation Oct 31, 2019
noisysocks added 2 commits Oct 31, 2019
@mtias mtias requested review from nerrad and ntwb as code owners Oct 31, 2019
@noisysocks noisysocks merged commit 7ca10d6 into master Oct 31, 2019
7 checks passed
7 checks passed
pull-request-automation
Details
Header rules - gutenberg-playground No header rules processed
Details
Pages changed - gutenberg-playground 3 new files uploaded
Details
Redirect rules - gutenberg-playground No redirect rules processed
Details
Mixed content - gutenberg-playground No mixed content detected
Details
Travis CI - Pull Request Build Passed
Details
netlify/gutenberg-playground/deploy-preview Deploy preview ready!
Details
Navigation block automation moved this from 👀 PRs to review to ✅ Done Oct 31, 2019
@noisysocks noisysocks deleted the update/use-rich-text-for-navigation-menu branch Oct 31, 2019
@mtias mtias mentioned this pull request Oct 31, 2019
12 of 12 tasks complete
@youknowriad youknowriad added this to the Gutenberg 6.9 milestone Nov 11, 2019
CreativeDive added a commit to CreativeDive/gutenberg that referenced this pull request Nov 12, 2019
…xtControl. (WordPress#18182)

* Use RichText for navigation menu item instead of TextControl.

The label should be immediately editable, with no layout jump.
It should also offer some of the rich text options and exclude
interactive formatting options.

It also adds placeholder text to empty menu items for clarity.

* removes useless ref for the RichText compoennt

renames a class to be more clear

* Navigation block: Import `RichText` from `block-editor`, not `editor`

* Navigation block: Rename block in E2E test fixtures

* Navigation block: Combine duplicate `@wordpress/block-editor` imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.