-
Notifications
You must be signed in to change notification settings - Fork 81
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
Update <KExternalLink> with icon and noopener noreferrer attr #142
Update <KExternalLink> with icon and noopener noreferrer attr #142
Conversation
Co-authored-by: Devon Rueckner <[email protected]>
Looking great, and thanks for testing the RTL behaviors! Two small notes:
|
Fixes comment's icon description Co-authored-by: Devon Rueckner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good except one thing I noted. I tested on Studio as well and it looked great! Thanks @sairina
@nucleogenesis In Arabic, for the Update Notification modal (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks @sairina !
Summary
Background:
openInNewTab
attr was recently added to<KExternalLink>
so that a value oftrue
would allow for the link to be opened in another tab. Previously,<KExternalLink>
usedtarget="_blank"
and did not have an icon to differentiate it as an external link as opposed to a link to another URL internally.In this PR
noopener noreferrer
attr was also added as an extra security measure to ensurewindow.opener = null
becausetarget="_blank"
is used in the component.Issues:
Addresses #123
Addresses #137
Addresses #94
Expected Behavior
Use of this component should:
-- to the Left of the link when link is written in RTL languages (e.g. Arabic)
-- to the Right of the link when link is written in LTR languages (e.g. English)
RTL/LTR Screenshots
<KExternalLink>
; from my understanding the above should actually be a use of the<KRouterLink>
though in Kolibri, it's currently a<KExternalLink>
and could potentially need to be fixed (see: Use of KExternalLink should never refer to Kolibri URLs, use KRouterLink kolibri#7482)Follow-up Notes
target=_blank
, that should be updated.openInNewTab
prop ofKExternalLink
kolibri#7712 can continue