-
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: datasource switch behaviour #38949
Conversation
WalkthroughThis pull request adds an additional dispatch call in the Changes
Sequence Diagram(s)sequenceDiagram
participant E as DatasourceEditorRouter
participant R as Redux Store
E->>R: dispatch(switchDatasource(id))
R-->>E: datasource switched
E->>R: dispatch(setDatasourceViewModeFlag(true))
R-->>E: view mode updated
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🔇 Additional comments (1)
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
|
## Description Current behavior: If editing mode is enabled for few datasources, then when switching datasources, we do not update the state(check before video). Also, if something has been changed in the datasource form, then when switching, we call the confirm modal. Changes: now, when switching datasources, we switch to view mode if nothing has been changed on the form and if something has been changed, we still call the modal. Before: https://github.com/user-attachments/assets/a91437fa-dd1d-43ef-8c99-8521999b80be After: https://github.com/user-attachments/assets/2868f628-9996-4566-a5b1-73e19bdd491c Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Datasource" ### 🔍 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/13089216392> > Commit: 256bcbb > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=13089216392&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Datasource` > Spec: > <hr>Sat, 01 Feb 2025 16:30:00 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated the datasource editor so that switching to a new datasource now automatically activates the proper view mode, ensuring a consistent and smoother experience for users. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
Current behavior: If editing mode is enabled for few datasources, then when switching datasources, we do not update the state(check before video). Also, if something has been changed in the datasource form, then when switching, we call the confirm modal. Changes: now, when switching datasources, we switch to view mode if nothing has been changed on the form and if something has been changed, we still call the modal.
Before:
https://github.com/user-attachments/assets/a91437fa-dd1d-43ef-8c99-8521999b80be
After:
https://github.com/user-attachments/assets/2868f628-9996-4566-a5b1-73e19bdd491c
Fixes #
Issue Number
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13089216392
Commit: 256bcbb
Cypress dashboard.
Tags:
@tag.Datasource
Spec:
Sat, 01 Feb 2025 16:30:00 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit