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

CRISTAL-422: Implement styles for external links #577

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

tkrieck
Copy link
Collaborator

@tkrieck tkrieck commented Jan 15, 2025

  • Implemented an icon for the external links as it is in XWiki Standard

Jira URL

https://jira.xwiki.org/projects/CRISTAL/issues/CRISTAL-422

Changes

Description

  • Provides proper styles for the external link icon

Clarifications

  • There was a style for external links before, but it was only an italic text that didn't provide much context.
  • In this implementation we are using the Bootstrap icons pack,

Screenshots & Video

Before:
image

After:
Screenshot 2025-01-15 at 11 18 50

Executed Tests

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A

* Implemented an icon for the external links as it is in XWiki Standard
display: inline-flex;
}

:deep(.wikiexternallink a:after) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does it behave in edit mode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuelleduc the editor does not use the XWiki css class wikiexternallink so it won't work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. But, the CCS should nonetheless be placed at a location where the external links will have the correct style applied once we start adding the right class.
If you want I can take over the PR for this part.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have more knowledge on that than me, so if it's not too much trouble for you, I actually prefer it. Otherwise, you can just point me in the right direction.

text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
font-size: 0.7rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels strange to fix the link size while it's probably something specific for each design system
I would limit this to only the additional icon (and any other think helping to distinguish visually external link), and nothing else.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this approach, but then the icon followed the main text size and became huge. Shoelace and Vuetify don't have specific styles for external links, so that's on us.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah right, I missed the style only applied on the :after part, so all good.

@manuelleduc manuelleduc merged commit 1931a3a into main Jan 20, 2025
4 of 5 checks passed
@manuelleduc manuelleduc deleted the CRISTAL-422 branch January 20, 2025 10:19
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.

2 participants