-
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
Icon of anchor is not shown in the Block Editor #16621
Comments
The issue that comes up for me is... I do also believe that when Full Site Editing comes into place that we will likely face the issue of showing something in the backend that we will not see in the frontend layout. @melchoyce suggestion is a very good idea. Something we can move forward with. I will also ask for Mark's @mapk and Joen's @jasmussen comment on this issue. |
Not a bad idea, Mel. Anchors are important when you need/use them, but they are also a rather advanced feature. Quick sidenote, there's some related conversation deep in the archives: #1734 The primary issue with showing a little anchor icon next to the item that has one, is that it either indents the heading (like in the classic editor), breaking the WYSIWYG feel. Or it sits offset to the side, and risks overlapping other content in complex layouts, or just getting cropped off the side of the screen. If we had a solid idea for where/how to show the anchor, I suspect it would be okay to do so. It would only show up if the user had intentionally added the anchor as text in the advanced section. I wonder if it could be aprt of the block toolbar? |
If the anchor is something only visible on the backend, I'm in favor of Mel's proposed solution. I don't think it should be included in the editor if it's not going on the frontend. There's always the option of showing a |
I tried making an anchor, and found I could only do it on a Heading. Is that correct, or did I miss something? Unlike the markup shown above, the current editor uses |
I think it is a good idea to try out, and see how it works. Let's remove the Needs Design Feedback and add the Needs Dev label to get started. |
Good to not put it on the left, because side UI has failed the many contexts in which blocks need to work. However when using the same font as the heading itself, it distinctly looks like content rather than block UI, which breaks the front-end/back-end visual sync, which is important. Is this meant to also show up on the frontend? |
I don't think it should show on the frontend. |
If it is to only show in the editor, I'd only show it on select, and I'd make it look more like block UI (like give it a background of the same material as the block toolbar). |
+100 on styling it as UI, including the background, because if you only affect the color, you have no idea if it's visible with what the theme is doing. |
Is the idea to only show the anchor in the heading block? Anchor can be set on lots of blocks now, so just showing it on the header seems inconsistent. |
You're referring to this one in the sidebar, right? You make a good point. Any block, virtually, can get anchors. But we can't show an anchor in-canvas in a consistent way, it won't work as blocks can be anything. Which rewinds us back to Mel's solution outlined in #16621 (comment) as a potential path forward. |
When we use anchors in a post, the icon indicating that there is an anchor is not shown in the Block Editor (view mode), in the Classic Editor there is no such problem.
Exemplifying with the following code:
As shown in the following print, in the Block Editor (view mode), the anchor icon is not shown:
In the Classic Editor, it is shown the icon that indicates the existence of an anchor:
The Block Editor should also show the icon which indicates that there is an anchor.
The text was updated successfully, but these errors were encountered: