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

Add indicator to all external links via CSS #13030

Open
mkllnk opened this issue Dec 11, 2024 · 0 comments
Open

Add indicator to all external links via CSS #13030

mkllnk opened this issue Dec 11, 2024 · 0 comments

Comments

@mkllnk
Copy link
Member

mkllnk commented Dec 11, 2024

Description

When a user clicks on a link, they should know if it is an internal or external link. External links are usually opened in a new tab. And some parts of our code are already adding an icon. But adding the icon in HTML can make translations containing HTML more complicated.

We suggest to use a CSS rule based on the target:

a[target="_blank"]::after {
  /*show the icon.. */
}

We currently display it like this:

<i class="icon-external-link"></i>

This came up in:

Acceptance Criteria & Tests

  1. All links that currently have an indicator icon, should still have it.
  2. Other links with target="_blank" should have the icon, including in user-defined text like shop messages.
  3. The current rich text editors should still work as before (with or without displaying the icon, doesn't matter).
  4. Links in the menus should not have the icon. Even if they go to an external page like https://about.openfoodnetwork.org.au it's considered internal.
  5. You will need to browse through lots of parts of the app to ensure that nothing breaks and everything looks correct.
@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Dec 11, 2024
@github-project-automation github-project-automation bot moved this to To triage (By the maintainers) in Welcome New Developers! Dec 11, 2024
@mkllnk mkllnk moved this from To triage (By the maintainers) to Frontend Easy in Welcome New Developers! Dec 11, 2024
@sigmundpetersen sigmundpetersen added the enhancement improvement label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: All the things 💤
Status: Frontend Easy
Development

No branches or pull requests

2 participants