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 workspace assets page UI bugs #8265

Merged
merged 14 commits into from
Sep 29, 2024

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Sep 20, 2024

Description

This PR is for fixing a bunch of UI bugs in the workspace assets page. Here are the fixed list:

  • The spacing around the table and search bar should be 16px
  • Remove the "Workspace" column and filter
  • Add tooltip to "Refresh" icon button
  • Change the label of the workspace select field to "Target workspace" and remove the field description
  • Add "Close" button to the footer of the resulting message flyout
  • Change "Objects" to "Assets" in the "Export" modal (all instances)
  • Change "Saved objects" to "Assets" in the Import flyout
  • Change "saved objects" to "assets" for the buttons

Issues Resolved

Screenshot

Global assets

image

Workspace assets

image
image
image
image

Testing the changes

  • Clone branch code and run yarn osd bootstrap --single-version ignore
  • Add below configs in config/opensearch_dashboards.yml
savedObjects.permission.enabled: true
workspace.enabled: true
uiSettings:
  overrides:
    'home:useNewHomePage': true
opensearchDashboards.dashboardAdmin.users: ['admin']
  • Run yarn start --no-base-path
  • Click "View all" in the "Assets" panel
  • The global assets should work as screenshot above
  • Enter a workspace use left navigation
  • Click "View all" in the "Assets" panel
  • The workspace assets page should work as screenshot above

Changelog

  • fix: [Workspace]Fix workspace assets page UI bugs

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: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 12 lines in your changes missing coverage. Please review.

Project coverage is 60.92%. Comparing base (8691010) to head (ab399fa).
Report is 165 commits behind head on main.

Files with missing lines Patch % Lines
...gement/public/management_section/mount_section.tsx 25.00% 9 Missing ⚠️
...ment_section/objects_table/saved_objects_table.tsx 81.81% 1 Missing and 1 partial ⚠️
src/plugins/workspace/public/plugin.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8265      +/-   ##
==========================================
- Coverage   60.92%   60.92%   -0.01%     
==========================================
  Files        3749     3749              
  Lines       89021    89033      +12     
  Branches    13899    13903       +4     
==========================================
+ Hits        54236    54240       +4     
- Misses      31423    31430       +7     
- Partials     3362     3363       +1     
Flag Coverage Δ
Linux_1 28.85% <19.44%> (-0.01%) ⬇️
Linux_2 56.35% <ø> (ø)
Linux_3 37.75% <17.64%> (?)
Linux_4 29.94% <67.64%> (+<0.01%) ⬆️
Windows_1 28.86% <19.44%> (-0.01%) ⬇️
Windows_2 56.30% <ø> (ø)
Windows_3 37.75% <17.64%> (-0.01%) ⬇️
Windows_4 29.94% <67.64%> (+<0.01%) ⬆️

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.

Comment on lines +144 to +149
label: i18n.translate(
'savedObjectsManagement.objectsTable.header.exportAssetsButtonLabel',
{
defaultMessage: 'Export all assets',
}
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to check new home page flag for all those wording change?

Copy link
Contributor Author

@wanglam wanglam Sep 26, 2024

Choose a reason for hiding this comment

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

This new home page flag check logic is already in line 121. I think we don't need to do it again here. This export button only displayed when new home page flag enabled.

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
@ruanyl ruanyl merged commit 3ef1e09 into opensearch-project:main Sep 29, 2024
69 of 71 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 29, 2024
* Update the gap between search bar and table

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update to target workspace and remove description

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add bottom Close button for copy result flyout

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update "Objects" to "Assets" in the export modal

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Hide workspace column and filter when in a workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add tooltip for table refresh button

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update objects to assets in top right buttons

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update objects to assets in flyout

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Changeset file for PR #8265 created/updated

* Reduce page content padding for new updated UX

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update meta title

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update object to asset

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 3ef1e09)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ruanyl pushed a commit that referenced this pull request Sep 30, 2024
* Update the gap between search bar and table



* Update to target workspace and remove description



* Add bottom Close button for copy result flyout



* Update "Objects" to "Assets" in the export modal



* Hide workspace column and filter when in a workspace



* Add tooltip for table refresh button



* Update objects to assets in top right buttons



* Update objects to assets in flyout



* Changeset file for PR #8265 created/updated

* Reduce page content padding for new updated UX



* Update meta title



* Update object to asset



---------



(cherry picked from commit 3ef1e09)

Signed-off-by: Lin Wang <wonglam@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
opensearch-project#8378)

* Update the gap between search bar and table



* Update to target workspace and remove description



* Add bottom Close button for copy result flyout



* Update "Objects" to "Assets" in the export modal



* Hide workspace column and filter when in a workspace



* Add tooltip for table refresh button



* Update objects to assets in top right buttons



* Update objects to assets in flyout



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

* Reduce page content padding for new updated UX



* Update meta title



* Update object to asset



---------



(cherry picked from commit 3ef1e09)

Signed-off-by: Lin Wang <wonglam@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