PromucFlow_constructor/app/client/src/sagas
sneha122 f36bcf2a6c
feat: query creation dumb templates replaced with smart templates (#24234)
## Description
 
This PR replaces dumb template that is shown on new query creation with
smart templates. With current implementation whenever we create a new DB
query, we see this template before writing the query, when we select any
of the template options, it shows us template query like `SELECT * FROM
users ORDER BY id LIMIT 10;` Since its a template query, users table may
not exist in user's actual database, thus leading them to error results.
<img width="1174" alt="Screenshot 2023-06-09 at 2 45 40 PM"
src="https://github.com/appsmithorg/appsmith/assets/30018882/4dede184-439f-4064-abe0-faf7b236748e">

With new implementation, we are removing this template page, instead if
we have the structure of the datasource available, we would simply get
the first table from the structure, and create select query using that.
This way we are populating query editor with user's actual table names
rather than dumb table name like `users`. Thus leading users to create
successful query

Note: This change is done only for sql plugins like MySQL, MSSQL,
PostgreSQL, Redshift, Oracle, Snowflake.

#### PR fixes following issue(s)
Fixes #23960 
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
- New feature (non-breaking change which adds functionality)
>
>
>
## 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
- [x] Manual
- [ ] Jest
- [x] Cypress
>
>
#### Test Plan
> Create a Connection on the DB 
> Create a Query from the established Query
> Ensure the 1st table data is placed when Add Query button is clicked
from the Review page
> If the query is created from Entity explorer ensure the right table
name is been added

#### Issues raised during DP testing
> Link issues raised during DP testing for better visibility and
tracking (copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] 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/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [x] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [x] Cypress test cases have been added and approved by SDET/manual QA
- [x] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-06-19 15:23:34 +05:30
..
__tests__ 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
ActionExecution fix: Throwing error 'Failed to execute function' when JSobject is deleted (#23993) 2023-06-19 14:04:29 +05:30
autoHeightSagas feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
CanvasSagas fix: casing changes (#23515) 2023-06-09 14:22:27 +05:30
WebsocketSagas feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
ActionSagas.ts feat: Enable fetch datasource structure for action (#24195) 2023-06-13 16:30:37 +05:30
ApiPaneSagas.ts fix: api url dynamic bindings (#23696) 2023-05-26 15:43:18 +05:30
AppThemingSaga.tsx feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
AutoLayoutUpdateSagas.tsx fix: casing changes (#23515) 2023-06-09 14:22:27 +05:30
BatchSagas.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
CollectionSagas.ts 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
ContextSwitchingSaga.ts chore: Removing feature flag for app level invites (#22650) 2023-04-26 12:48:16 +05:30
CurlImportSagas.ts 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
DatasourcesSagas.ts fix: Fix get structure for Mock datasources (#24464) 2023-06-17 12:06:10 +05:30
DebuggerSagas.ts chore: Add errorId to DEBUGGER_NEW_ERROR_MESSAGE telemetry (#22542) 2023-04-19 23:42:18 +05:30
editorContextSagas.ts 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
ErrorSagas.tsx feat: disabling the toast messages on view mode without debug flag (#23768) 2023-06-09 19:28:45 +05:30
EvaluationsSaga.ts chore: Log JS Function execution (#24163) 2023-06-09 06:41:07 +01:00
EvalWorkerActionSagas.ts chore: Log JS Function execution (#24163) 2023-06-09 06:41:07 +01:00
FormEvaluationSaga.ts Add web api types 2023-06-14 17:29:15 +05:30
GitSyncSagas.ts fix: rebase error message during conflicts (#24414) 2023-06-17 14:25:16 +05:30
GlobalSearchSagas.ts 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
helper.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
InitSagas.ts fix: 503 error fixed when navigating to homepage (#21971) 2023-04-14 08:19:43 +05:30
JSActionSagas.ts fix: Throwing error 'Failed to execute function' when JSobject is deleted (#23993) 2023-06-19 14:04:29 +05:30
JSLibrarySaga.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
JSPaneSagas.ts fix: Sanitise toast error msgs (#22544) 2023-05-31 12:14:07 +05:30
layoutConversionSagas.ts fix: casing changes (#23515) 2023-06-09 14:22:27 +05:30
LintingSagas.ts feat: show lint errors in async functions bound to sync fields (#21187) 2023-04-03 16:11:15 +05:30
ModalSagas.ts fix: Auto dimension not working within Modal widget (#23724) 2023-06-01 09:09:23 +05:30
OnboardingSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
OneClickBindingSaga.ts fix: one click binding postgress sorting issue when primary key is no… (#24090) 2023-06-08 16:58:48 +05:30
PageSagas.tsx fix: casing changes (#23515) 2023-06-09 14:22:27 +05:30
PageVisibilitySagas.ts feat: Bundle optimization and first load improvements (#21667) 2023-05-11 10:56:03 +05:30
PluginSagas.ts 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
PostEvaluationSagas.ts chore: Added instanceId and workspaceId to ENTITY_BINDING_SUCCESS event (#24478) 2023-06-15 14:41:43 +05:30
PostLintingSagas.ts feat: show lint errors in async functions bound to sync fields (#21187) 2023-04-03 16:11:15 +05:30
ProvidersSaga.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
QueryPaneSagas.ts feat: query creation dumb templates replaced with smart templates (#24234) 2023-06-19 15:23:34 +05:30
RecentEntitiesSagas.ts chore: code splitting changes for appsmith ai v0.1 (#22521) 2023-04-20 20:42:35 +05:30
ReplaySaga.ts 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
SaaSPaneSagas.ts chore: Add analytics event to track telemetry is disabled & update properties for INVITE_USER event (#24042) 2023-06-06 02:57:40 +05:30
selectors.tsx feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
SnapshotSagas.ts fix: casing changes (#23515) 2023-06-09 14:22:27 +05:30
SnipingModeSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
TemplatesSagas.ts fix: conversion of app with pages imported from templates and adjust height for blank container (#23404) 2023-05-25 17:50:08 +05:30
ThemeSaga.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
ToastSagas.ts feat: disabling the toast messages on view mode without debug flag (#23768) 2023-06-09 19:28:45 +05:30
UtilSagas.ts 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
WidgetAdditionSagas.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30
WidgetBlueprintSagas.test.ts fix: List widget issues in Auto Layout (#23252) 2023-05-29 10:06:19 +05:30
WidgetBlueprintSagas.ts fix: List widget issues in Auto Layout (#23252) 2023-05-29 10:06:19 +05:30
WidgetDeletionSagas.ts feat: Expand auto height implementation to handle auto height use cases. (#22974) 2023-05-11 10:15:14 +05:30
WidgetEnhancementHelpers.ts 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
WidgetLoadingSaga.ts 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
WidgetOperationSaga.test.tsx
WidgetOperationSagas.tsx chore: [one click binding] allow switching between js mode and non js mode on property control (#24355) 2023-06-16 14:46:56 +05:30
WidgetOperationUtils.test.ts fix: combineDynamicBindings function (#22600) 2023-04-26 23:58:17 +05:30
WidgetOperationUtils.ts fix: Remove excess padding on right side and fix widget drop in nested containers (#22533) 2023-04-26 13:39:11 -04:00
WidgetSelectionSagas.ts fix: Do not set widget ancestry if selection happens via canvas (#22069) 2023-04-10 12:55:14 +05:30
WidgetSelectUtils.test.ts 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
WidgetSelectUtils.ts feat: [epic] appsmith design system version 2 deduplication (#22030) 2023-05-20 00:07:06 +05:30