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

Update sample data page UI when useUpdatedUX enabled #8291

Merged
merged 7 commits into from
Sep 29, 2024

Conversation

wanglam
Copy link
Contributor

@wanglam wanglam commented Sep 23, 2024

Description

This PR is for updating the sample data page UI when useUpdatedUX enabled. It mainly includes below changes:

  • Move data source selector to the top right to align with other pages
  • Remove duplicate sample data title

Issues Resolved

#8312

Screenshot

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
  • Login with admin user and enter a specific workspace
  • Click "Sample data" in the left navigation
  • The UI should be the same with above screenshot

Changelog

  • feat: Update sample data page UI when useUpdatedUX enabled

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>
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 60.90%. Comparing base (8691010) to head (5f354fc).
Report is 165 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/home/public/plugin.ts 0.00% 4 Missing ⚠️
...ublic/application/components/tutorial_directory.js 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8291      +/-   ##
==========================================
- Coverage   60.92%   60.90%   -0.03%     
==========================================
  Files        3749     3749              
  Lines       89021    89034      +13     
  Branches    13899    13899              
==========================================
- Hits        54236    54222      -14     
- Misses      31423    31494      +71     
+ Partials     3362     3318      -44     
Flag Coverage Δ
Linux_1 28.85% <0.00%> (ø)
Linux_2 ?
Linux_3 37.75% <0.00%> (?)
Linux_4 29.96% <78.26%> (+0.01%) ⬆️
Windows_1 28.87% <0.00%> (ø)
Windows_2 56.30% <ø> (ø)
Windows_3 37.76% <0.00%> (-0.01%) ⬇️
Windows_4 29.96% <78.26%> (+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 +174 to +182
return await renderApp(
params.element,
{
...coreStart,
navigation,
setHeaderActionMenu: params.setHeaderActionMenu,
},
params.history
);
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 this change for home page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The page will be broken if we visit /app/home#/tutorial_directory directly. To align with the latest design, I think we should render the same UI for this entry.

@ruanyl ruanyl merged commit c1a349a 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 sample data page with latest UI when useUpdatedUX enabled

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

* Fix crashed in home page

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

* Changeset file for PR #8291 created/updated

* Reduce spacing between sample data cards

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 c1a349a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 30, 2024
* Update sample data page with latest UI when useUpdatedUX enabled



* Fix crashed in home page



* Changeset file for PR #8291 created/updated

* Reduce spacing between sample data cards



---------



(cherry picked from commit c1a349a)

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
…ect#8291) (opensearch-project#8377)

* Update sample data page with latest UI when useUpdatedUX enabled



* Fix crashed in home page



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

* Reduce spacing between sample data cards



---------



(cherry picked from commit c1a349a)

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