-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: update client logic for DS form #24474
Conversation
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5319146695. |
Deploy-Preview-URL: https://ce-24474.dp.appsmith.com |
/build-deploy-preview skip-tests=true recreate=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5320027081. |
Deploy-Preview-URL: https://ce-24474.dp.appsmith.com |
/ok-to-test |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/5320856349. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5320856349.
|
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5320856349.
|
/build-deploy-preview skip-tests=true recreate=true |
/ok-to-test |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5330162577. |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/5330163410. |
Deploy-Preview-URL: https://ce-24474.dp.appsmith.com |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5330163410. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/5330163410. |
/build-deploy-preview skip-tests=true recreate=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/5331142924. |
Closing since fix is to be done with #23920 |
@@ -192,7 +193,7 @@ class DatasourceEditorRouter extends React.Component<Props, State> { | |||
requiredFields: {}, | |||
configDetails: {}, | |||
filterParams: { | |||
id: "", | |||
id: DEFAULT_ENV_ID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the envId added within the filterParams? And if this is the best place to put it, can we rename the id to envId
@@ -460,8 +464,8 @@ class DatasourceSaaSEditor extends JSONtoForm<Props, State> { | |||
pageId={pageId} | |||
/> | |||
) : null} | |||
{!_.isNil(sections) | |||
? _.map(sections, this.renderMainSection) | |||
{!isNil(sections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is isNil preferred over isEmpty? If posible can we use isEmpty
@@ -474,17 +475,25 @@ function ReconnectDatasourceModal() { | |||
useEffect(() => { | |||
if (isModalOpen && !isTesting) { | |||
const id = selectedDatasourceId; | |||
const pending = datasources.filter((ds: Datasource) => !ds.isConfigured); | |||
const pending = datasources.filter((ds: Datasource) => | |||
ds.datasourceStorages ? !isEnvironmentConfigured(ds) : true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the condition here could be better since ds.datasourceStorages could be an empty Object which is still truthy. If it is fine, then please ignore
|
||
return datasource; | ||
}), | ||
recentDatasources: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are recentDatasources?
if (!!queryParams && queryParams.hasOwnProperty(ENVIRONMENT_QUERY_KEY)) { | ||
return queryParams[ENVIRONMENT_QUERY_KEY].toLowerCase(); | ||
} | ||
return "unused_env"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create an enum/constant for this variable?
Description
PR fixes following issue(s)
Fixes # (issue number)
Media
Type of change
Testing
How Has This Been Tested?
Test Plan
Issues raised during DP testing
Checklist:
Dev activity
QA activity:
Test Plan Approved
label after Cypress tests were reviewedTest Plan Approved
label after JUnit tests were reviewed