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

[Workspace] Refactor data source association panel #8383

Conversation

Kapian1234
Copy link
Contributor

@Kapian1234 Kapian1234 commented Sep 30, 2024

Description

Refactor data source association panel

Issues Resolved

Screenshot

before
Screenshot 2024-09-30 at 13 28 20

after
Screenshot 2024-09-30 at 16 17 34

Testing the changes

Changelog

  • feat: Refactor data source association panel

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
@@ -109,7 +117,7 @@ export const WorkspaceCreatorForm = (props: WorkspaceCreatorFormProps) => {
<EuiSpacer size="m" />
{/* SelectDataSourcePanel is only visible for dashboard admin and when data source is enabled*/}
{isDashboardAdmin && isDataSourceEnabled && (
<>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep this fragment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

)}
<EuiSpacer size="s" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these spacer should be inside fragment, then it won't take extra spaces when data source not enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe these spacer could be deleted since we have padding in the panel now

Copy link
Contributor

Choose a reason for hiding this comment

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

These spacing is between panel and panel right? This spacing should follow data source panel. It should be hidden if data source panel not displayed.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, I get it. thank you

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
{i18n.translate('workspace.creator.form.associateDataSourceTitle', {
defaultMessage: 'Associate data sources',
<EuiPanel>
<EuiTitle
Copy link
Contributor

@wanglam wanglam Sep 30, 2024

Choose a reason for hiding this comment

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

Can we use EuiText + h2 as panel title like this to align with the guidance.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
showDataSourceManagement={true}
/>
</EuiText>
<SelectDataSourcePanel
Copy link
Contributor

@wanglam wanglam Sep 30, 2024

Choose a reason for hiding this comment

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

Do we need more spacing between description and SelectDataSourcePanel?

Copy link
Contributor Author

@Kapian1234 Kapian1234 Sep 30, 2024

Choose a reason for hiding this comment

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

In SelectDataSourcePanel, there's already a <EuiSpacer size="m" />, and it would display only when the table exists

ruanyl
ruanyl previously approved these changes Sep 30, 2024
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Copy link
Contributor

Choose a reason for hiding this comment

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

@Kapian1234 I think this file should not be included in this PR. Can we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
/
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 83d5fba into opensearch-project:main Sep 30, 2024
67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 1, 2024
* refactor association panel

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* Changeset file for PR #8383 created/updated

* resolve some issues

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* update title style

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* update title style

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* update placeholder

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* update placeholder

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

* /

Signed-off-by: Kapian1234 <wanjinch@amazon.com>

---------

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 83d5fba)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Oct 1, 2024
* refactor association panel



* Changeset file for PR #8383 created/updated

* resolve some issues



* update title style



* update title style



* update placeholder



* update placeholder



* /



---------



(cherry picked from commit 83d5fba)

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Oct 3, 2024
…t#8383) (opensearch-project#8419)

* refactor association panel



* Changeset file for PR opensearch-project#8383 created/updated

* resolve some issues



* update title style



* update title style



* update placeholder



* update placeholder



* /



---------



(cherry picked from commit 83d5fba)

Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@ananzh ananzh added the v2.18.0 label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants