chore: Adding permission check for the plus button in tabs list#39694
chore: Adding permission check for the plus button in tabs list#39694ankitakinger merged 1 commit intoreleasefrom
Conversation
WalkthroughThis pull request updates two components. In the EditorTabs component, new imports for feature flags and permission checks are added, and the logic that controls the visibility of the "Add" tab is enhanced by incorporating an additional permission check. In the PushFailedWarning component, a redundant CSS class ("ankita") is removed from the Container component, which alters the styling without affecting functionality. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EditorTabs
participant FeatureFlag
participant PermissionsSelector
participant ActionPermission
User->>EditorTabs: Open editor tabs
EditorTabs->>FeatureFlag: useFeatureFlag(FEATURE_FLAG)
EditorTabs->>PermissionsSelector: getPagePermissions
EditorTabs->>ActionPermission: getHasCreateActionPermission(isFeatureEnabled, pagePermissions)
ActionPermission-->>EditorTabs: Return canCreateActions result
EditorTabs-->>User: Render tabs with updated hideAdd logic
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (7)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
…mithorg#39694) ## Description Adding permission check for the plus button in tabs list to handle the edge case in GAC where we see a new query tab with no datasource options in the page to create one. Fixes [appsmithorg#39673](appsmithorg#39673) ## Automation /ok-to-test tags="@tag.IDE" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/13811690526> > Commit: 6501918 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13811690526&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.IDE` > Spec: > <hr>Wed, 12 Mar 2025 13:19:18 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the editor’s tab behavior so the "Add" button is only displayed when files are present and the user has the appropriate permissions. - **Style** - Refined the display styling of push failure warnings for a cleaner appearance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Adding permission check for the plus button in tabs list to handle the edge case in GAC where we see a new query tab with no datasource options in the page to create one.
Fixes #39673
Automation
/ok-to-test tags="@tag.IDE"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13811690526
Commit: 6501918
Cypress dashboard.
Tags:
@tag.IDESpec:
Wed, 12 Mar 2025 13:19:18 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit