-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: split default tab logic #38414
fix: split default tab logic #38414
Conversation
WalkthroughThe pull request focuses on refactoring the Changes
Sequence DiagramsequenceDiagram
participant Component as PluginActionResponse
participant Hook as useDefaultTab
participant Redux as Redux Store
Component->>Hook: Invoke useDefaultTab
Hook->>Redux: Check plugin type
Hook->>Redux: Determine tab visibility
Hook->>Redux: Dispatch tab selection action
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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
|
This PR has increased the number of cyclic dependencies by 1, when compared with the release branch. Refer this document to identify the cyclic dependencies introduced by this PR. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx (1)
73-73
: Smooth integration of new hook
InvokinguseDefaultTab
here streamlines the default tab selection without cluttering the component-level logic.Consider adding a short comment or docstring explaining the hook’s purpose, to aid future contributors in quickly understanding its role.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx
(2 hunks)app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/useDefaultTab.tsx
(1 hunks)app/client/src/ee/PluginActionEditor/components/PluginActionResponse/hooks/useDefaultTab.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- app/client/src/ee/PluginActionEditor/components/PluginActionResponse/hooks/useDefaultTab.tsx
🔇 Additional comments (3)
app/client/src/ce/PluginActionEditor/components/PluginActionResponse/hooks/useDefaultTab.tsx (2)
13-19
: Encapsulate default tab logic effectively
Good job abstracting the default tab logic into a dedicated hook. This improves maintainability by centralizing related state checks and dispatch logic.
20-37
: Guard conditions for plugin requirement
Ensure there’s always a well-defined fallback in case neither showSchema
nor (plugin.type === PluginType.API)
conditions are satisfied. Consider adding an else block that documents the intentional no-op to avoid any confusion.
app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx (1)
14-14
: Clear separation of responsibilities
Importing useDefaultTab
aligns well with the existing structure. This keeps the component focused on rendering and delegates tab logic to the hook, improving clarity.
## Description Split the logic for the plugin action tabs. Now the files in CE and EE repo for the `ce` folder are the same. Redefine the logic in EE hooks only. EE PR — appsmithorg/appsmith-ee#5840 ## Automation /ok-to-test tags="@tag.All" ### 🔍 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/12546120368> > Commit: 8fa499e > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12546120368&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Mon, 30 Dec 2024 13:26:11 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No
Description
Split the logic for the plugin action tabs. Now the files in CE and EE repo for the
ce
folder are the same. Redefine the logic in EE hooks only.EE PR — https://github.com/appsmithorg/appsmith-ee/pull/5840
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12546120368
Commit: 8fa499e
Cypress dashboard.
Tags:
@tag.All
Spec:
Mon, 30 Dec 2024 13:26:11 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?