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
Member

@mtias 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.
@mtias mtias added the [Block] Navigation Affects the Navigation Block label Oct 30, 2019
@draganescu
Copy link
Contributor

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 draganescu left a comment

Choose a reason for hiding this comment

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

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

@noisysocks noisysocks added this to 👀 PRs to review in Navigation editor via automation Oct 31, 2019
@noisysocks noisysocks merged commit 7ca10d6 into master Oct 31, 2019
Navigation editor automation moved this from 👀 PRs to review to ✅ Done Oct 31, 2019
@noisysocks noisysocks deleted the update/use-rich-text-for-navigation-menu branch October 31, 2019 05:01
@youknowriad youknowriad added this to the Gutenberg 6.9 milestone Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Empty menu items in navigation block need to show a placeholder
5 participants