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]Fix/the UI of workspace list table #8219

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Qxisylolo
Copy link
Contributor

@Qxisylolo Qxisylolo commented Sep 18, 2024

Description

This pr fixes the style of workspace list table(addressing issues 217-227, and 232-233) by:

  1. Change the default number of the rows displayed in the table to 20
  2. tooltip misalignment can be fixed with pr [Bug] Fix the tooltip display misalignment issue #8202
  3. some styles associated with padding and compressed search bar/ filters

Screenshot

截屏2024-10-09 17 09 10 截屏2024-10-09 17 09 22 截屏2024-10-09 17 09 25

Changelog

  • fix: Fix/the UI of workspace list table

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

Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.77%. Comparing base (3381dcd) to head (7176e0f).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
...rkspace/public/components/workspace_list/index.tsx 50.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8219      +/-   ##
==========================================
+ Coverage   60.75%   60.77%   +0.01%     
==========================================
  Files        3798     3798              
  Lines       90690    90689       -1     
  Branches    14277    14277              
==========================================
+ Hits        55101    55113      +12     
+ Misses      32090    32076      -14     
- Partials     3499     3500       +1     
Flag Coverage Δ
Linux_1 ?
Linux_2 56.39% <ø> (ø)
Linux_3 37.61% <ø> (ø)
Linux_4 29.82% <ø> (ø)
Windows_1 29.09% <50.00%> (+0.01%) ⬆️
Windows_2 56.34% <ø> (ø)
Windows_3 37.61% <ø> (ø)
Windows_4 29.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Qxisylolo Qxisylolo force-pushed the fix/the-UI-of-workspace-list-table branch from 92c2b34 to 4886299 Compare October 9, 2024 09:12
opensearch-changeset-bot bot added a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 9, 2024
@Qxisylolo Qxisylolo force-pushed the fix/the-UI-of-workspace-list-table branch from c378907 to 0f61a69 Compare October 9, 2024 09:16
@ruanyl ruanyl added workspace and removed 2.17.1 labels Oct 29, 2024
Copy link
Member

@ruanyl ruanyl left a comment

Choose a reason for hiding this comment

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

I see there is a conflict now, you may need to address :)

return isDashboardAdmin ? (
<>
<EuiButton color="danger" iconType="trash" onClick={onClick}>
Delete {selection.length} {selection.length > 1 ? 'workspaces' : 'workspace'}
Copy link
Member

Choose a reason for hiding this comment

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

Let's add i18n for the text, take this as example:

<FormattedMessage
  id="dataSourcesManagement.dataSourcesTable.dissociateSelectedDataSources"
  defaultMessage="{selectionSize, plural, one {Remove # association} other {Remove # associations}}"
  values={{ selectionSize: selectedDataSources.length }}
/>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your comments, already updated.

@Qxisylolo Qxisylolo force-pushed the fix/the-UI-of-workspace-list-table branch from 0f61a69 to 9bf0be9 Compare October 31, 2024 06:01
opensearch-changeset-bot bot added a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 31, 2024
Comment on lines 355 to 361
{i18n.translate('workspace.list.page.delete.button.info', {
defaultMessage: 'Delete {num} workspace{pluralSuffix, select, true {} other {s}}',
values: {
num: selection.length,
pluralSuffix: selection.length === 1,
},
})}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{i18n.translate('workspace.list.page.delete.button.info', {
defaultMessage: 'Delete {num} workspace{pluralSuffix, select, true {} other {s}}',
values: {
num: selection.length,
pluralSuffix: selection.length === 1,
},
})}
{i18n.translate('workspace.list.page.delete.button.info', {
defaultMessage:
'{selectedCount, plural, one {Delete # workspace} other {Delete # workspaces}}',
values: {
selectedCount: selection.length,
},
})}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you! already updated.

@Qxisylolo Qxisylolo force-pushed the fix/the-UI-of-workspace-list-table branch from 7176e0f to f52af39 Compare November 11, 2024 07:15
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.

3 participants