-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Avoid using inline RichText element for navigation link #21856
Conversation
Size Change: -7 B (0%) Total Size: 845 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well, warnings are gone!
What is it on the front end? |
Also, if it's displayed as a flex item, why does RichText warn? RichText will only warn if it's displayed as an inline element. Tag name does not matter. |
@ellatrix I'm guessing because there's no explicit It's an A |
|
Description
This switches the Navigation Link block's label to the default
div
instead of aspan
in the editor.This change is to avoid a console warning triggered by RichText when an inline element is used:
This label element is a flex item, so the layout shouldn't be affected. This may also improve some elements of editing the labels that are the reason that warning exists, but it's hard to say what.
How has this been tested?
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: