feat: Disabled datasource selector in query pages
Description
This PR disable the datasource selector inside query editor. This change is behind feature flag to ensure that if this is needed, we can revert back using feature flag toggling.
EE PR: https://github.com/appsmithorg/appsmith-ee/pull/5382
Fixes #35534
Automation
/ok-to-test tags="@tag.Sanity, @tag.Datasource"
:mag: Cypress test results
[!TIP] π’ π’ π’ All cypress tests have passed! π π π Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11398091865 Commit: b9d73a325d0d000043fb8be10f0b7e27d596d8d3 Cypress dashboard. Tags:
@tag.Sanity, @tag.DatasourceSpec:
Fri, 18 Oct 2024 08:58:20 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
Summary by CodeRabbit
-
New Features
- Introduced a new feature flag:
release_ide_datasource_selector_enabled, allowing for future enhancements to theDatasourceSelectorcomponent. - Conditional rendering of the
DatasourceSelectorin theQueryEditorHeaderbased on the new feature flag.
- Introduced a new feature flag:
-
Bug Fixes
- Disabled the test suite for the "Switch datasource" functionality as it is currently under a feature flag.
These changes enhance the flexibility of the application and improve the user experience by controlling the visibility of features based on their activation status.
/build-deploy-preview skip-test=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11383749752.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 36940.
recreate: .
π Walkthrough
Walkthrough
The pull request introduces a new feature flag, release_ide_datasource_selector_enabled, to manage the visibility of the DatasourceSelector component within the QueryEditorHeader. This flag is initialized to false in the DEFAULT_FEATURE_FLAG_VALUE object. The rendering logic of the DatasourceSelector is modified to conditionally display the component based on the state of this feature flag, thereby altering the control flow without changing the overall structure of existing constants.
Changes
| File Path | Change Summary |
|---|---|
| app/client/src/ce/entities/FeatureFlag.ts | Added new feature flag release_ide_datasource_selector_enabled to FEATURE_FLAG and initialized it to false in DEFAULT_FEATURE_FLAG_VALUE. |
| app/client/src/pages/Editor/QueryEditor/QueryEditorHeader.tsx | Introduced a check for the new feature flag to conditionally render the DatasourceSelector component based on its state. |
| app/client/cypress/e2e/Regression/ServerSide/QueryPane/SwitchDatasource_spec.js | Skipped the "Switch datasource" test suite by adding .skip to the describe block, with comments on feature removal. |
Possibly related PRs
- #36125: Modifies tests related to Google Sheets, which may be indirectly related to the feature flag changes in the main PR.
- #36222: Involves changes to the user interface for saving and editing data sources, potentially relating to the feature flag's impact on the
DatasourceSelector. - #36339: Focuses on fixing tests related to the DataSource schema, which could be relevant if the feature flag affects data source handling.
- #36389: Addresses a layout issue in the datasource schema page, possibly relating to the visibility of components affected by the feature flag.
- #36766: Fixes an issue with the visibility of the "New query" button, which could be influenced by the feature flag's impact on UI components.
Suggested labels
skip-changelog, Query & JS Pod, Integrations Product, Test
Suggested reviewers
- ApekshaBhosale
- sagar-qa007
- hetunandu
π In the code we weave, a flag we now conceive,
release_ide_datasource_selector_enabledis here,
With logic to show, or hide in the flow,
A toggle for features, letβs give a cheer!
Tests may skip and features flip,
In our codebase, we continue to grip! π
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?
πͺ§ Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
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)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Deploy-Preview-URL: https://ce-36940.dp.appsmith.com
/build-deploy-preview skip-test=true
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11512276526.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 36940.
recreate: .
Deploy-Preview-URL: https://ce-36940.dp.appsmith.com