appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
33.96k stars 3.66k forks source link

[Bug]: Incorrect UX on reconnect datasource modal #28154

Open ramsaptami opened 11 months ago

ramsaptami commented 11 months ago

Is there an existing issue for this?

Description

Datasource configuration modal during app import does not highlight the right datasource when user clicks on the one that's already configured

Steps To Reproduce

  1. Import an app that's got multiple datasources as seen in the video
  2. configure one of the datasources and save
  3. switch between configured and unconfigured datasources and notice the top most datasource getting selected by default when a confirgured datasource is selected (see video for more clarity)

Public Sample App

No response

Environment

Production

Issue video log

https://www.loom.com/share/7082c9edc28b4fc9adf9e4359db39807

Version

Cloud

Nikhil-Nandagopal commented 11 months ago

@riteshkew @brayn003 this looks like a pretty major issue. How did this flow break?

riteshkew commented 11 months ago

We'll triage this on our end and update.

brayn003 commented 11 months ago

https://github.com/appsmithorg/appsmith/blame/59d0f999ad84e0dffcf29968088d441135fb7655/app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx#L505 @AmanAgarwal041 Hi, the issue is caused by the above code. Can you please check this?

AmanAgarwal041 commented 11 months ago

@brayn003 Will be fixing and adding a test case for the same

NilanshBansal commented 5 months ago

Tested, this issue is reproducible on prod. Clicking on a configured datasource, selects the first unconfigured datasource from the list.

https://github.com/appsmithorg/appsmith/assets/25542733/22bb5e57-4576-4463-8795-d5202842ecd1

NilanshBansal commented 5 months ago

After raising a fix for this bug, on clicking the configured datasource the following text shows up which was already configured in the codebase. Please check the attached video for more details. Is this the acceptable design copy for this @carinanfonseca or we need to make some changes here?

These datasources were imported successfully!
Please fill up the missing datasources

https://github.com/appsmithorg/appsmith/assets/25542733/115c8203-7ee7-478e-9f86-072ca893ded7

carinanfonseca commented 5 months ago

"This datasource was successfully imported. Please reconnect the datasources marked with an error."

NilanshBansal commented 5 months ago

The same piece of code in app/client/src/pages/Editor/gitSync/ReconnectDatasourceModal.tsx file was updated in the following PRs. https://github.com/appsmithorg/appsmith/pull/23920 https://github.com/appsmithorg/appsmith/pull/23959

Removing the changes that were made in the above PRs actually solves the issue but we don't yet know the impact of that change in other areas of code. Hence, resolving this looks slightly trickier to me right now. Referring this to @ayushpahwa @AmanAgarwal041 makes more sense as they know the initial fixes that were made with the above PRs.

cc: @rohan-arthur

NilanshBansal commented 4 months ago

cc: @ayushpahwa