Skip to content
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: ds discard popup issue fixes #19114

Merged
merged 12 commits into from Dec 30, 2022
Merged

fix: ds discard popup issue fixes #19114

merged 12 commits into from Dec 30, 2022

Conversation

sneha122
Copy link
Contributor

Description

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

Media

Screen.Recording.2022-12-21.at.8.09.38.PM.mov

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

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

How Has This Been Tested?

  • Manual
  • 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:

  • Test plan has been approved by relevant developers
  • Test plan has been peer reviewed by QA
  • Cypress test cases have been added and approved by either SDET or manual QA
  • Organized project review call with relevant stakeholders after Round 1/2 of QA
  • Added Test Plan Approved label after reveiwing all Cypress test

@vercel
Copy link

vercel bot commented Dec 21, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
appsmith ✅ Ready (Inspect) Visit Preview Dec 27, 2022 at 7:04AM (UTC)

@github-actions github-actions bot added Bug Something isn't working Datasources Issues related to configuring datasource on appsmith Integrations Pod Issues related to a specific integration Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Release labels Dec 21, 2022
@sneha122
Copy link
Contributor Author

/ok-to-test sha=634bca8

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3750304565.
Workflow: Appsmith External Integration Test Workflow.
Commit: 634bca8.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3750304565_1

@Aishwarya-U-R
Copy link
Contributor

/ok-to-test sha=4adba5f

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3752388715.
Workflow: Appsmith External Integration Test Workflow.
Commit: 4adba5f.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3752388715_1

@sneha122
Copy link
Contributor Author

@Aishwarya-U-R Resolved all code review comments. Please check

@sneha122
Copy link
Contributor Author

/ok-to-test sha=bf95f10

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3757524651.
Workflow: Appsmith External Integration Test Workflow.
Commit: bf95f10.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3757524651_1

Copy link
Contributor

@Aishwarya-U-R Aishwarya-U-R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cypress looks Good!

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/DSDiscardBugs_spec.ts
cypress/integration/Smoke_TestSuite/ClientSideTests/IDE/MaintainContext&Focus_spec.js
cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js

@sneha122
Copy link
Contributor Author

/ok-to-test sha=e5701e5

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3785753733.
Workflow: Appsmith External Integration Test Workflow.
Commit: e5701e5.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3785753733_1

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/Binding/xmlParser_spec.js
cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js

2 similar comments
@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ClientSideTests/BugTests/Autocomplete_JS_spec.ts
cypress/integration/Smoke_TestSuite/ServerSideTests/QueryPane/EmptyDataSource_spec.js

@Parthvi12
Copy link
Contributor

/ok-to-test sha=e5701e5

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3791995848.
Workflow: Appsmith External Integration Test Workflow.
Commit: e5701e5.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3791995848_1

@github-actions
Copy link

The following are new failures, please fix them before merging the PR cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_Existing_app_spec.js
cypress/integration/Smoke_TestSuite/ClientSideTests/Templates/Fork_Template_To_App_spec.js

@sneha122
Copy link
Contributor Author

/perf-test

@github-actions
Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3800921580.
Workflow: Performance Tests Workflow.
Commit: ``.
PR: 19114.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-638dd7cd2913ba43778b915e?pr=19114&runId=3800921580_1

@prapullac prapullac added the Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable label Dec 30, 2022
@sharat87 sharat87 merged commit b7c104c into release Dec 30, 2022
@sharat87 sharat87 deleted the fix/ds-discard-popup-fixes branch December 30, 2022 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Datasources Issues related to configuring datasource on appsmith Integrations Pod Issues related to a specific integration Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Release Test Plan Approved Manual/Cypress tests covers changes made on the PR. Else, add skip-testPlan label if not applicable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Even without editing the user is displayed with Pop up in Auth API
6 participants