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

2990: Open external links in new tab #3044

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

steffenkleinle
Copy link
Member

Short description

Open external links in new tab and do some refactoring.

Proposed changes

  • Open external urls in new tab and unify different methods to check for internal/external links
  • Avoid passing down navigate and use it directly
  • Rename internalUrlPattern
  • Extract sandbox to separate component

Side effects

N/A

Testing

Open all different kinds of links both in the remote content as well as anywhere in the app (e.g. footer, header, ...).

Resolved issues

Fixes: #2990


@steffenkleinle steffenkleinle force-pushed the 2990-external-links-new-tab branch from adf7d6a to 0bb0215 Compare January 22, 2025 11:57
@@ -17,176 +14,24 @@ import {
hideIframe,
preserveIFrameSourcesFromContent,
} from '../utils/iframes'

const SandBox = styled.div<{ $centered: boolean; $smallText: boolean }>`
Copy link
Member Author

Choose a reason for hiding this comment

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

Just moved this to a separate component, no changes made

@steffenkleinle steffenkleinle force-pushed the 2990-external-links-new-tab branch 3 times, most recently from 48d3eeb to 073a25b Compare January 22, 2025 12:18
@steffenkleinle steffenkleinle force-pushed the 2990-external-links-new-tab branch from 073a25b to e21792d Compare January 22, 2025 12:25
Copy link
Contributor

@lunars97 lunars97 left a comment

Choose a reason for hiding this comment

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

Something is not working right. When I click on external links for ex., Open in Google Maps or by clicking on the website link, it is not opening a new tab with external website source, and some internal files' url like pdf are being cut off and therefore the files are not being found...

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.

Open external links in new tab
2 participants