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

fix: Link UX #1304

Merged
merged 6 commits into from
Dec 10, 2024
Merged

fix: Link UX #1304

merged 6 commits into from
Dec 10, 2024

Conversation

matthewlipski
Copy link
Collaborator

@matthewlipski matthewlipski commented Dec 4, 2024

This PR addresses 2 UX issues with links:

  1. The keyboard shortcut (Mod+K) toggles the link mark but doesn't open the link editing menu, so no href is set. This has been changed so the shortcut now just opens the link creation popover in the formatting toolbar. I think the only real flaw of this approach is that the formatting toolbar needs to be open for the shortcut to work, but otherwise imo the UX is good. This issue could also be fixed but I think it's a pretty unlikely scenario and fixing it would add fairly significant complexity.
  2. Setting a link without a protocol prefix would make the href get treated as a relative URL. This lead to cases where setting a link like www.google.com would redirect users to <protocol>://<current-domain>/www.google.com instead of https://www.google.com. This has been changed so that link URLs without a protocol are prefixed with http:// when the user creates/updates a link.

Closes #1141
Closes #552

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Dec 10, 2024 10:32am
blocknote-website ✅ Ready (Inspect) Visit Preview Dec 10, 2024 10:32am

@Blapi
Copy link

Blapi commented Dec 4, 2024

@matthewlipski this is amazing ! That would also close #522 :)

packages/core/src/editor/BlockNoteExtensions.ts Outdated Show resolved Hide resolved
packages/core/src/editor/BlockNoteExtensions.ts Outdated Show resolved Hide resolved
@matthewlipski matthewlipski merged commit 5e4389c into main Dec 10, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX feedback with links Cannot update a component (to2)
3 participants