-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Render edit view upon initial link creation in rich text #58279
base: trunk
Are you sure you want to change the base?
Conversation
FYI I'm not 100% happy with this. Why?
|
Size Change: +39 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
I bleive this is a great improvement to the UX of making links in the block editor. The reason for this change being so good is because our link created process is more complex compared to other simpler text editing environments:
The old behavior of going straight to preview and thus auto saving, while it seemed to be easier and better for the simple use case of linking to 'https://example.com':
I think this flow serves the needs of this UX much better. Sure it can be refined even more (see @getdave 's PR with making the preview visible at all times for example) but this iteration here feels great to me already. |
Thank you for your feedback @draganescu.
Just noting that in this PR the link is automatically saved upon initial creation. You just have the option to continue with further edits. Just wanted to make sure that was clear. |
But maybe the link shouldn't be automatically created on the initial screen? That's one of the big issues with going straight to the edit screen. It's unclear if the link has been created. If I hit Cancel, does it mean the link isn't created? If the edit screen buttons become "Cancel" and "Create Link," it would be much clearer, but would require more clicks to create. |
That is not such a bad idea since the edit modal has to be dismissed one way or another, and it does capture focus. |
Problem is that we're adding an additional step to link creation by removing the auto-application and requiring a selection on "Create Link". I wouldn't think that acceptable. |
ceace09
to
518ac08
Compare
What?
When a link is first created in rich text (e.g. paragraph block), the Link UI remains open and displays the "edit" view (as opposed to the "preview" view).
Closes #50892
Why?
In many scenarios seeing a preview of a link immediately upon creation of that link is not helpful. In most cases users want to immediately alter the settings of the link or do some other alternation.
See Issue for further rationale.
How?
<LinkControl>
into edit mode.Opens in new tab
from the preview as this was only there as a stop gap.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Capture.on.2024-01-25.at.20-33-47.mp4