-
Notifications
You must be signed in to change notification settings - Fork 47.1k
feat(editor): Make the main create resource button aware of the selected tab #20725
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
base: master
Are you sure you want to change the base?
feat(editor): Make the main create resource button aware of the selected tab #20725
Conversation
…ted tab (no-changelog)
BundleMonFiles added (2)
Total files change +255.73KB Groups added (2)
Final result: ✅ View report in BundleMon website ➡️ |
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.
1 issue found across 4 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue">
<violation number="1" location="packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue:134">
Rule violated: **Prefer Typeguards over Type casting**
Please remove the new `as IconName` cast here; the `'lock'` literal already satisfies the button icon type, so annotate or structure the value instead of asserting.
(Based on your team's feedback about verifying surrounding lines before flagging `as` usages.) [FEEDBACK_USED]</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
const createCredentialButton = computed(() => ({ | ||
value: ACTION_TYPES.CREDENTIAL, | ||
label: i18n.baseText('projects.header.create.credential'), | ||
icon: sourceControlStore.preferences.branchReadOnly ? ('lock' as IconName) : undefined, |
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.
Prompt for AI agents
~~~ Address the following comment on packages/frontend/editor-ui/src/features/projects/components/ProjectHeader.vue at line 134: Please remove the new `as IconName` cast here; the `'lock'` literal already satisfies the button icon type, so annotate or structure the value instead of asserting. (Based on your team's feedback about verifying surrounding lines before flagging `as` usages.) @@ -127,16 +128,65 @@ const createWorkflowButton = computed(() => ({ +const createCredentialButton = computed(() => ({ + value: ACTION_TYPES.CREDENTIAL, + label: i18n.baseText('projects.header.create.credential'), + icon: sourceControlStore.preferences.branchReadOnly ? ('lock' as IconName) : undefined, + size: 'mini' as const, + disabled: ~~~
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
This has been requested multiple time as it's confusing to change tab and still have the main resource creation cta to be "Create workflow"
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-4296/feature-make-the-top-right-create-button-contextual-to-the-page-it-is
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)