-
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
Demo cmd click for navigation while editing #49582
Conversation
Size Change: +171 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
Flaky tests detected in 64e3c63. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4656962698
|
This is cool! For the sake of conversation, a quick GIF showing me holding ⌘ while clicking a link to a post: There's obviously a draft PR error in that GIF showing it link to gutenberg.test, whereas I'm using local, so there's some hardcoding going on. But I can glean the behavior, it navigates you to the published URL. I love that, but can we make it navigate to the URL inside the editor instead? I.e. keep you in the editor. This would essentialy be a first power-user verson of "browse mode", and ideally we could make it work for any URL, not just those from links, but from navigation items, or buttons as well. Speaking of keeping you in the editor, the main concept is inspired a bit by VS Code as well, so we might even consider including a tooltip: The tooltip could get annoying, but it could also make it usable by not just those in the know, so something to test out. What do you think? |
74511cb
to
64e3c63
Compare
I fixed the hardcoded host and yes the intent is to remain in the editor if the link you cmd+click is a page or a post. If the link is an external link it would just open in a new tab. But what is annoying to me is that whenever you click in a link that pop over shows up. Is cmd+click a good interaction or should we add a button to that popover instead? |
I would avoid adding buttons to the popover, mainly because I think of this feature as being link agnostic — that is, it should ideally work on any URL in the block editor, whether hyperlinks, buttons, nav items, or even third party stuff. I recognize that might be a super tall order, and we can potentially do or start with less. But essentially I see this as the first steps of actual browse mode, the feature where you can navigate from page to page inside the editor. So it seems great to start super minimalist for now, even without a tooltip if that's challenging. The URL popover can evolve in various ways, to be less incompatible with any tooltips if that's a challenge. If we should do anything to that popover, it could be to have the URL that shows up inside the popover open the link in the editor rather than the frontend. This link: What do you think? |
I will close this and try the idea from @jasmussen to click on the URL of the linkUI. |
Here is a bad demo of a nice feature: cmd + click to navigate in the editor to linked posts or pages.
cmd-click-post-navigation.mp4