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 selector style alignment #8592

Conversation

Qxisylolo
Copy link
Contributor

@Qxisylolo Qxisylolo commented Oct 15, 2024

Description

This pr addresses following issues to the workspace selector:

  1. workspace content are first sorted by most recently visited. Unvisited workspaces will be sorted alphabetically
  2. workspace selector has the similar style with data source selector
  3. resolve issues affecting the display of the workspace selector on mobile

the background color of the workspace selector takes euiSideNavBackgroundColor
the background color of data source selector takes euiHeaderBackgroundColor

Screenshot

  1. workspace content
截屏2024-10-15 14 25 45
  1. on mobile
截屏2024-10-15 13 46 43
  1. In theme V7
    workspace selector:
v7

Dark mode:
截屏2024-10-16 10 03 28

data source selector:
v7-data

  1. In theme V9
    workspace selector:
v9

Dark mode:
9

data source selector:
v9-data

  1. In theme next
    workspace selector:
next

Dark mode:
截屏2024-10-16 10 02 35

data source selector:
next-data

Changelog

  • fix: workspace selector style alignment

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

Hailong-am
Hailong-am previously approved these changes Oct 15, 2024
Copy link
Collaborator

@Hailong-am Hailong-am left a comment

Choose a reason for hiding this comment

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

have you tried with dark mode?

@Qxisylolo
Copy link
Contributor Author

have you tried with dark mode?

Please check the new screenshots, all look fine~

Comment on lines 81 to 83
accessTimeDescription: recentWorkspace
? `Viewed ${moment(recentWorkspace.timestamp).fromNow()}`
: `Not visited recently`,
Copy link
Member

Choose a reason for hiding this comment

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

Needs i18n?

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 the review, already updated

@Qxisylolo Qxisylolo dismissed stale reviews from Hailong-am and SuZhou-Joe via 31f95a2 October 16, 2024 08:23
@Qxisylolo Qxisylolo force-pushed the fix/workspace_selector_style_alignment branch from 79d8f31 to 31f95a2 Compare October 16, 2024 08:23
opensearch-changeset-bot bot added a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 16, 2024
SuZhou-Joe
SuZhou-Joe previously approved these changes Oct 17, 2024
ruanyl
ruanyl previously approved these changes Oct 17, 2024
SuZhou-Joe
SuZhou-Joe previously approved these changes Oct 17, 2024
@Qxisylolo Qxisylolo dismissed stale reviews from SuZhou-Joe and ruanyl via 32a78cd October 18, 2024 02:47
@Qxisylolo Qxisylolo force-pushed the fix/workspace_selector_style_alignment branch from d5b806a to 32a78cd Compare October 18, 2024 02:47
@SuZhou-Joe SuZhou-Joe merged commit e09c137 into opensearch-project:main Oct 18, 2024
68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 18, 2024
* fix/workspace_selector_style_alignment, sortByRecentVisitedAndAlphabetical

Signed-off-by: Qxisylolo <[email protected]>

* align styles, typo

Signed-off-by: Qxisylolo <[email protected]>

* resolve comment

Signed-off-by: Qxisylolo <[email protected]>

* add i18n

Signed-off-by: Qxisylolo <[email protected]>

* fix i18n in test

Signed-off-by: Qxisylolo <[email protected]>

* Changeset file for PR #8592 created/updated

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit e09c137)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Oct 18, 2024
* fix/workspace_selector_style_alignment, sortByRecentVisitedAndAlphabetical



* align styles, typo



* resolve comment



* add i18n



* fix i18n in test



* Changeset file for PR #8592 created/updated

---------



(cherry picked from commit e09c137)

Signed-off-by: Qxisylolo <[email protected]>
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>
amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Oct 19, 2024
…#8592)

* fix/workspace_selector_style_alignment, sortByRecentVisitedAndAlphabetical

Signed-off-by: Qxisylolo <[email protected]>

* align styles, typo

Signed-off-by: Qxisylolo <[email protected]>

* resolve comment

Signed-off-by: Qxisylolo <[email protected]>

* add i18n

Signed-off-by: Qxisylolo <[email protected]>

* fix i18n in test

Signed-off-by: Qxisylolo <[email protected]>

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

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
sejli pushed a commit to sejli/OpenSearch-Dashboards that referenced this pull request Oct 21, 2024
…#8592)

* fix/workspace_selector_style_alignment, sortByRecentVisitedAndAlphabetical

Signed-off-by: Qxisylolo <[email protected]>

* align styles, typo

Signed-off-by: Qxisylolo <[email protected]>

* resolve comment

Signed-off-by: Qxisylolo <[email protected]>

* add i18n

Signed-off-by: Qxisylolo <[email protected]>

* fix i18n in test

Signed-off-by: Qxisylolo <[email protected]>

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

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Qxisylolo added a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Oct 30, 2024
…#8592)

* fix/workspace_selector_style_alignment, sortByRecentVisitedAndAlphabetical

Signed-off-by: Qxisylolo <[email protected]>

* align styles, typo

Signed-off-by: Qxisylolo <[email protected]>

* resolve comment

Signed-off-by: Qxisylolo <[email protected]>

* add i18n

Signed-off-by: Qxisylolo <[email protected]>

* fix i18n in test

Signed-off-by: Qxisylolo <[email protected]>

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

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
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.

4 participants