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

[ui] Fix base path when opening a new window #25909

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

hellendag
Copy link
Member

@hellendag hellendag commented Nov 13, 2024

Summary & Motivation

Preserve the base path when opening a new tab for "Open in Launchpad" on a schedule/sensor dry run.

I created a hook to wrap extraction of the base path and using _blank as the target. I see a few places where we're using window.open without applying the base path, so in a followup I'll go through and clean those up too.

How I Tested These Changes

Open a schedule, click "Test schedule", choose a tick. Click "Open in Launchpad", verify that the new tab opens with a URL that includes the base path (deployment) prefix.

Changelog

[ui] Fix "Open in Playground" link when testing a schedule or sensor by ensuring that it opens to the correct deployment.

Copy link
Member Author

hellendag commented Nov 13, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@hellendag hellendag marked this pull request as ready for review November 13, 2024 20:53
@@ -111,12 +113,12 @@ function OpenInLaunchpadButton({
})),
}),
);
window.open(
Copy link
Member Author

Choose a reason for hiding this comment

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

We may also want to consider linting against this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-1zi7lz2z6-elementl.vercel.app
https://dish-fix-open-window-base-path.core-storybook.dagster-docs.io

Built with commit 9713613.
This pull request is being automatically deployed with vercel-action

@salazarm salazarm merged commit 4800941 into master Nov 14, 2024
2 checks passed
@salazarm salazarm deleted the dish/fix-open-window-base-path branch November 14, 2024 16:16
gibsondan pushed a commit that referenced this pull request Nov 14, 2024
## Summary & Motivation

Preserve the base path when opening a new tab for "Open in Launchpad" on
a schedule/sensor dry run.

I created a hook to wrap extraction of the base path and using `_blank`
as the target. I see a few places where we're using `window.open`
without applying the base path, so in a followup I'll go through and
clean those up too.

## How I Tested These Changes

Open a schedule, click "Test schedule", choose a tick. Click "Open in
Launchpad", verify that the new tab opens with a URL that includes the
base path (deployment) prefix.

## Changelog

[ui] Fix "Open in Playground" link when testing a schedule or sensor by
ensuring that it opens to the correct deployment.
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