PromucFlow_constructor/app/client/src/entities
sneha122 b7c104c66f
fix: ds discard popup issue fixes (#19114)
This PR includes following changes:
- With latest datasource autosave improvements, we do not save the
datasource immediately but save it on explicit click of save button, so
in case user has not saved any changes and tries to leave the page, we
have added a popup to inform users that they have unsaved changes and
whether they would like to save them or not.
- The issue was in case of postgres and authenticated API datasource,
this popup was getting seen even when the user has not made any changes
in the datasource configuration. This PR solves that issue.
- The unsaved changes popup needs to be shown only when user has made
any new changes in the datasource form

TL;DR
- We have used redux form's isDirty method to check if user has made any
new updates to the form or not. This isDirty compares initial value of
datasource form with current form value and if current form value is
different it shows the unsaved changes popup
- The issue occurred because in case of postgres and authenticated API
datasource, we initialise 1 default pair of host address and port
(postgres), and default pairs of headers and query parameters
(Authenticated API). These initial default changes made the form dirty
and so user used to see the popup even when they have not explicitly
made any changes.
- This PR fixes the issue by setting initial form value with these
defaults so they do not make the form dirty.

Fixes #18962 , #18998 

https://user-images.githubusercontent.com/30018882/208931098-b570e3c4-10bc-4b76-bd54-531ccf869436.mov

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-12-30 15:53:24 +05:30
..
Action feat: Handle permission driven views for auto-saving pages and action… (#16950) 2022-12-01 12:00:50 +05:30
AppCollab
AppsmithConsole feat: Split evaluation and linting (#17287) 2022-11-03 14:53:15 +05:30
AppTheming fix: Theme Stylesheet refactor (#18258) 2022-11-28 10:14:31 +05:30
Datasource fix: ds discard popup issue fixes (#19114) 2022-12-30 15:53:24 +05:30
DataTree chore: update imports for code split (#19085) 2022-12-22 12:04:28 +05:30
Engine feat: Import javascript libraries (#17895) 2022-12-21 22:44:47 +05:30
JSCollection feat: Handle permission driven views for auto-saving pages and action… (#16950) 2022-12-01 12:00:50 +05:30
Replay feat: Automatic height updates for widgets based on contents (Auto Height) (#18341) 2022-11-23 15:18:23 +05:30
Tour
URLRedirect fix: update settings pane validations (#18739) 2022-12-12 10:21:14 +05:30
Widget feat: Dynamic Menu Items - Menu Button Widget (#17652) 2022-12-01 10:25:57 +05:30
App.ts
FeatureFlags.ts feat: Import javascript libraries (#17895) 2022-12-21 22:44:47 +05:30
GitSync.ts chore: use documentation link from the error response for git errors (#10662) 2022-01-29 13:56:27 +05:30