PromucFlow_constructor/app/client/src/pages/Editor
Ayush Pahwa 0f26a90bed
fix: datasource query schema show condition (#30539)
## Description
With the introduction of new workflow plugin we have added a flag
`requiresDatasource` in the plugins which allows users to create a query
on a plugin without the datasource. This kind of actions already exist
in REST APIs but not for queries. The schema section is to be hidden in
case the query doesn't have a parent datasource. But in some cases this
flag was not coming causing the condition to fail. This PR fixes the
condition fetch and allow schema to be shown by default if the flag is
not present.

#### PR fixes following issue(s)
Fixes #30543

#### Type of change

- Bug fix (non-breaking change which fixes an issue)

## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [ ] Manual
- [ ] JUnit
- [ ] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved stability in the query editor by ensuring the `showSchema`
option is correctly determined when a plugin's data source requirement
is unspecified.
- Updated the `actionHelpers.ts` file to include the import of `Plugin`
from "api/PluginApi" and the addition of a new function
`doesPluginRequireDatasource` that checks if a plugin requires a
datasource.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-23 13:16:43 +05:30
..
__tests__ feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
APIEditor chore: Remove unused services (#30292) 2024-01-23 05:43:16 +05:30
AppSettingsPane fix: fixing message variable name due to run issues (#30478) 2024-01-19 17:56:26 +05:30
CanvasLayoutConversion chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
CanvasPropertyPane chore: Add an extra feature flag to control App sidebar rollout (#28876) 2023-11-15 16:49:41 +05:30
commons chore: Add IDE side pane and manage navigation (#28063) 2023-10-18 12:44:10 +05:30
CommunityTemplates/Modals chore: add unit tests for community modules components (#30458) 2024-01-22 12:51:46 +05:30
CustomWidgetBuilder chore: custom widget onReady warning and template updates (#30335) 2024-01-17 19:44:14 +05:30
DataSourceEditor feat: query should be populated based on table selected on datasource… (#30306) 2024-01-22 17:43:07 +05:30
DatasourceInfo feat: query should be populated based on table selected on datasource… (#30306) 2024-01-22 17:43:07 +05:30
EditorName feat: New header with reorganized structure (#30059) 2024-01-05 13:48:23 +05:30
EntityNavigation chore: Custom widget (alpha) (#27571) 2023-11-14 10:03:37 +05:30
Explorer feat: workflows query in apps code split (#30424) 2024-01-22 19:50:22 +07:00
FirstTimeUserOnboarding feat: removed welcome tour (#30294) 2024-01-17 10:38:29 +05:30
GeneratePage chore: add analytics event for query failure post schema fetch pass (#28574) 2023-11-07 16:27:19 +05:30
gitSync fix: adding new settings modal (#30320) 2024-01-19 15:14:38 +05:30
GlobalHotKeys fix: Widget selection context switch adjustments (#30117) 2024-01-12 10:53:47 +05:30
GuidedTour chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
IDE feat: workflows query in apps code split (#30424) 2024-01-22 19:50:22 +07:00
IntegrationEditor feat: Appsmith AI as datasource plugin (#29794) 2024-01-16 20:19:08 +05:30
JSEditor chore: Split screen foundations (#30060) 2024-01-09 15:28:27 +05:30
MultiSelectPropertyPane changes in evaluation for EE - split (#27144) 2023-09-12 17:21:39 +05:30
NavigationSettings chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
PropertyPane chore: misc updates to custom widget (#30114) 2024-01-16 10:52:17 +05:30
QueryEditor fix: datasource query schema show condition (#30539) 2024-01-23 13:16:43 +05:30
SaaSEditor chore: entity name generation refactor to include other entity types (#30316) 2024-01-17 15:34:50 +05:30
ThemePropertyPane chore: Create a separate theme settings panel for WDS (#29196) 2023-12-01 15:39:21 +03:00
WDSThemePropertyPane feat: Tabler Icons (#30248) 2024-01-19 11:54:44 +03:00
WidgetsEditor fix: Widget selection context switch adjustments (#30117) 2024-01-12 10:53:47 +05:30
ActionSettings.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
AppsmithLink.tsx chore: Refactoring code for entity explorer on app editor to support package editor (#27844) 2023-10-11 19:41:07 +05:30
Canvas.tsx feat: Tabler Icons (#30248) 2024-01-19 11:54:44 +03:00
EditorHeader.tsx chore: Add an extra feature flag to control App sidebar rollout (#28876) 2023-11-15 16:49:41 +05:30
EditorSaveIndicator.tsx chore: Refactoring editor app name component for modules (#28055) 2023-10-16 14:37:39 +05:30
EditorShareButton.tsx chore: Refactoring code for entity explorer on app editor to support package editor (#27844) 2023-10-11 19:41:07 +05:30
EntityNotFoundPane.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
FormConfig.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
FormControl.tsx changes in evaluation for EE - split (#27144) 2023-09-12 17:21:39 +05:30
HelpBarInHeader.tsx feat: branch protection (#28526) 2023-11-03 22:43:36 +05:30
HelpButton.tsx feat: removed welcome tour (#30294) 2024-01-17 10:38:29 +05:30
index.tsx fix: adding new settings modal (#30320) 2024-01-19 15:14:38 +05:30
loader.tsx chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
MainContainerWidthToggles.test.tsx chore: Rename and cleanup of editor components (#26944) 2023-09-12 19:44:02 +05:30
MainContainerWidthToggles.tsx chore: Rename and cleanup of editor components (#26944) 2023-09-12 19:44:02 +05:30
Popper.tsx fix: Adjust evaluated popover position based on the target's position in the view port (#29912) 2023-12-29 12:53:09 +05:30
PropertyPaneHelpButton.tsx chore: Move the widget config to widget class (#26073) 2023-09-06 17:45:04 +05:30
RealtimeAppEditors.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
RequestConfirmationModal.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
ShareApplicationForm.tsx chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com> 2023-03-16 17:11:47 +05:30
ToggleModeButton.tsx chore: update preview button to make use of toggle (#26822) 2023-08-31 14:44:50 +05:30
utils.ts chore: action response view refactor (#29031) 2023-11-24 11:34:06 +05:30
WidgetCard.tsx fix: Widget selection context switch adjustments (#30117) 2024-01-12 10:53:47 +05:30
WidgetCardsPane.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
WidgetsEditorEntityExplorer.tsx [Chore]: App Sidebar Library Pane (#28332) 2023-11-03 10:54:58 +05:30
WidgetSidebarWithTags.tsx chore: custom widget (#28926) 2023-12-28 12:16:28 +05:30