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

Improve Bard link UX #11384

Closed
wants to merge 1 commit into from
Closed

Conversation

edalzell
Copy link
Contributor

It's best practice to never open internal links in a new window, but also always open external links in a new window, while setting the title to Open in a new window.

@jasonvarga
Copy link
Member

It's best practice to [...] always open external links in a new window

Is it?

@edalzell
Copy link
Contributor Author

Apparently, I'll find some references. I could make this config driven if you like.

@daun
Copy link
Contributor

daun commented Jan 24, 2025

I think this might lead to false positives if editors paste in full urls to other entries? As in "copy from browser url bar, paste into editor". Ideally, the logic would know if it's an actual external link or not, regardless of it being a fully-qualified url.

@edalzell
Copy link
Contributor Author

It's only changing default behaviour though, not preventing you from doing anything. I can make it opt-in.

@edalzell
Copy link
Contributor Author

Apparently, I'll find some references. I could make this config driven if you like.

@adnankussair can you help here?

@adnankussair
Copy link

Based on personal experience this URL field is used for 3 purposes:

  1. Linking to external sites/pages (different domain) externaldomain.com
  2. Linking to on-page anchors: #anchor-on-page on mydomain.com
  3. Linking to internal pages with a deep link (on-page anchor) mydomain.com\subpage#anchor-on-page

We have noticed the following based when dealing with clients and their content:

  1. Most (if not all) our clients prefer to link external sites links (sites that they don't own) to be opened in a new window
  2. We are continuously reminding clients that best UX practice for any link that is set to open in a new window is to set the title attribute to Opens in a new window. They often forget to do this.

Choice is key:

  1. I think the choice aspect is key here. By having this be an optional config we can align with client's recurring desire to have all external links open in a new window.
  2. Even if we opt to not accept this PR into core, I do think that selecting the Opens in a new window toggle should add Opens in a new window title attribute if one isn't entered. We may need got consider localization if we do this.

@edalzell
Copy link
Contributor Author

Doing a different PR first and taking a different approach for the external links (customizing the link node stuff for our clients)

@edalzell edalzell closed this Jan 24, 2025
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.

4 participants