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] update search bar layout and align workspace selector #8649

Merged
merged 12 commits into from
Oct 23, 2024

Conversation

Hailong-am
Copy link
Collaborator

@Hailong-am Hailong-am commented Oct 18, 2024

Description

  1. Adjust workspace selector to align with left nav items
  2. Let search bar popup when click on it
  3. Use normal font weight for search items text

Issues Resolved

Screenshot

Before
image

image

After

items show with normal font weight

image

workspace selector align with left nav

image

Testing the changes

  1. enable workspace and new homepage by putting this into yml
workspace.enabled: true
uiSettings:
  overrides:
    "home:useNewHomePage": true
  1. start OSD yarn start

Changelog

  • fix: finetune search bar and workspace selector style

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
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.

opensearch-changeset-bot bot added a commit to Hailong-am/OpenSearch-Dashboards that referenced this pull request Oct 18, 2024
@Hailong-am Hailong-am changed the title [workspace] update search bar layout [workspace] update search bar layout and align workspace selector Oct 18, 2024
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 78.72340% with 10 lines in your changes missing coverage. Please review.

Project coverage is 60.86%. Comparing base (5d74306) to head (b36bc22).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...core/public/chrome/ui/header/header_search_bar.tsx 89.47% 3 Missing and 1 partial ⚠️
.../components/global_search/search_pages_command.tsx 42.85% 2 Missing and 2 partials ⚠️
...pace/public/components/global_search/page_item.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8649   +/-   ##
=======================================
  Coverage   60.86%   60.86%           
=======================================
  Files        3793     3793           
  Lines       90381    90386    +5     
  Branches    14185    14190    +5     
=======================================
+ Hits        55006    55010    +4     
+ Misses      31898    31897    -1     
- Partials     3477     3479    +2     
Flag Coverage Δ
Linux_1 29.09% <6.38%> (+<0.01%) ⬆️
Linux_2 56.41% <89.47%> (+0.01%) ⬆️
Linux_3 37.69% <0.00%> (+<0.01%) ⬆️
Linux_4 29.82% <0.00%> (+<0.01%) ⬆️
Windows_1 29.11% <6.38%> (+<0.01%) ⬆️
Windows_2 56.36% <89.47%> (+0.01%) ⬆️
Windows_3 37.69% <0.00%> (+<0.01%) ⬆️
Windows_4 29.82% <0.00%> (+<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.

Hailong-am and others added 3 commits October 18, 2024 20:46
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@SuZhou-Joe
Copy link
Member

image May I know if this misalignment is by intension?

flush="both"
{...homeLinkProps}
onClick={onIconClick}
className="homeIcon"
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
className="homeIcon"
className="navGroupEnabledHomeIcon"

Will the class name conflict with the existing homeIcon?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated to navGroupEnabledHomeIcon as suggested.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
@Hailong-am
Copy link
Collaborator Author

image May I know if this misalignment is by intension?

Yes,
image

{isPopoverOpen && (
<EuiPopover
panelStyle={{ minWidth: '400px', minHeight: '100px' }}
button={<></>}
Copy link
Member

Choose a reason for hiding this comment

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

Q: why using <></> as the popover anchor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Popover will always show with its anchor, the purpose of this will make it looks like only popover displayed. And button is required, so i put an empty element here.

image

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks :)

@Hailong-am Hailong-am merged commit 79fed30 into opensearch-project:main Oct 23, 2024
68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 23, 2024
)

* update search bar layout

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Changeset file for PR #8649 created/updated

* update search bar layout

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* update test case

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* style update

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* typo

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* support search nav items by its parent title

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 79fed30)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Hailong-am pushed a commit that referenced this pull request Oct 23, 2024
) (#8687)

* update search bar layout



* Changeset file for PR #8649 created/updated

* update search bar layout



* update test case



* style update



* typo



* support search nav items by its parent title



* address review comments



---------



(cherry picked from commit 79fed30)

Signed-off-by: Hailong Cui <ihailong@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>
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