-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[dashboard] Fix Arc favourites #20466
base: main
Are you sure you want to change the base?
Conversation
@@ -458,11 +463,17 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps, | |||
} | |||
|
|||
redirectTo(url: string) { | |||
if (this.state.redirected) { |
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.
Nice!
🫧 What are situations where we need to reset this value? 🤔
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.
Good question: I'd say it's enough when React resets it when the page unmounts. On the page level, this prop should be permanent (or at least I don't see reasons why we'd forget about having redirected you somewhere).
@filiptronicek Can you re-deploy the preview pls? 🙏 |
@geropl aaah, it just broke. Let me deploy it now... |
should be up again: https://ft-fix-arc-redirects.preview.gitpod-dev.com/workspaces |
@filiptronicek I noted that I see the alert for a second before I'm effectively redirect. Not super important, but it talks about "probably opened in a new tab", while it gets replaced by the new content right after - which is a bit confusing. Any ideas on how to avoid that? 🤔 |
Great catch, I couldn't reproduce this myself but makes sense that it happens. I'm thinking of adding an additional prop that will trigger 2 seconds after we redirect, so that it's not there even before the UA gets the chance to properly redirect you. |
We'll be merging this one after the New Year. |
Description
There's a funny bug that happened when you favorited the Gitpod Dashboard in Arc: when you open a favorited website, it does not want you to leave its origin and upon redirection to another one opens it in a new tab. This would be cool with us if we didn't try to redirect you on every workspace status update (spoiler alert: we do).
This PR stores a
redirected
property in the React state and prevents multiple redirects from happening. There's also a tiny piece of UI that tells you what happened if you end up back in the favorited tab, with buttons to more easily retry or get back to the dashboard.Related Issue(s)
Fixes CLC-820
How to test
/hold