-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
fix(editor): When cloud users click on "How to update your n8n version" auto-login them before redirecting to the dashboard (no-changelog) #11467
Conversation
… them before redirecting to the dashboard
This helps consolidate all logic to redirect to owner to the cloud dashboard in one place, the uiStore.
e41bace
to
abb68a6
Compare
@@ -628,6 +630,40 @@ export const useUIStore = defineStore(STORES.UI, () => { | |||
lastCancelledConnectionPosition.value = undefined; | |||
} | |||
|
|||
const isInstanceOwnerInCloud = () => { |
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.
would this be a better fit in the cloud plans or users store?
because ui store is already too big and general, and is slowly getting broken apart.
* cloud dashboard that redirects the user to the manage page where they can upgrade to a new n8n version. | ||
* Otherwise, it redirect them to our docs. | ||
*/ | ||
const goToVersions = async () => { |
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.
would this be a better fit in the versions store? maybe gotToUpgrade and generateUpgradeLink as well?
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.
moved all method that redirect into their own composable
location.href = versionsLink; | ||
}; | ||
|
||
const goToDashboard = async () => { |
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.
would this be a better fir in the cloud plans store? maybe generateCloudDashboardAutoLoginLink as well?
…ate-info-url-they-dont-get-v2
}; | ||
}); | ||
|
||
describe('usePageRedirectionHelper', () => { |
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.
thank you for adding all these tests
|
n8n Run #7659
Run Properties:
|
Project |
n8n
|
Branch Review |
ado-2616-bug-when-cloud-users-click-on-update-info-url-they-dont-get-v2
|
Run status |
Passed #7659
|
Run duration | 04m 24s |
Commit |
55f6a0d640: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 RicardoE105 🗃️ e2e/*
|
Committer | Ricardo Espinoza |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
0
|
Skipped |
0
|
Passing |
461
|
View all changes introduced in this branch ↗︎ |
✅ All Cypress E2E specs passed |
✅ All Cypress E2E specs passed |
Summary
Title self explanatory.
Builds on top of #11466
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-2616/bug-when-cloud-users-click-on-update-info-url-they-dont-get-auto
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)