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] Hide first home breadcrumbs within workspace #7992

Conversation

Hailong-am
Copy link
Contributor

Description

Hide the home breadcrumbs when we are in a workspace, but keep it in recent popover

image

Issues Resolved

Screenshot

Testing the changes

Changelog

  • feat: [Workspace] Hide home breadcrumbs when in a workspace

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

opensearch-changeset-bot bot added a commit to Hailong-am/OpenSearch-Dashboards that referenced this pull request Sep 4, 2024
@Hailong-am
Copy link
Contributor Author

@AMoo-Miki @zhongnansu can you help to review this change?

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.52%. Comparing base (84d5de3) to head (7968674).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7992   +/-   ##
=======================================
  Coverage   60.52%   60.52%           
=======================================
  Files        3728     3728           
  Lines       88297    88300    +3     
  Branches    13662    13663    +1     
=======================================
+ Hits        53439    53444    +5     
+ Misses      31603    31602    -1     
+ Partials     3255     3254    -1     
Flag Coverage Δ
Linux_1 28.72% <20.00%> (-0.01%) ⬇️
Linux_2 56.25% <100.00%> (+<0.01%) ⬆️
Linux_3 37.41% <0.00%> (+<0.01%) ⬆️
Linux_4 29.60% <0.00%> (-0.01%) ⬇️
Windows_1 28.73% <20.00%> (-0.01%) ⬇️
Windows_2 56.20% <100.00%> (+<0.01%) ⬆️
Windows_3 37.41% <0.00%> (-0.01%) ⬇️
Windows_4 29.60% <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 pushed a commit to Hailong-am/OpenSearch-Dashboards that referenced this pull request Sep 5, 2024
@Hailong-am Hailong-am force-pushed the hide_home_breadcrumbs_for_workspace branch from d48a366 to d2d7262 Compare September 5, 2024 03:17
Hailong-am and others added 3 commits September 5, 2024 11:21
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the hide_home_breadcrumbs_for_workspace branch from d2d7262 to b83d54f Compare September 5, 2024 03:21
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@@ -73,6 +75,10 @@ export function HeaderBreadcrumbs({
crumbs = breadcrumbEnricher(crumbs);
}

if (dropHomeFromBreadcrumb && crumbs.length && Object.hasOwn(crumbs[0], 'home')) {
Copy link
Member

@ruanyl ruanyl Sep 5, 2024

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 if home is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could add this condition as well. There only have one place to set this additional property, i think it's ok only check existence.

Copy link
Member

Choose a reason for hiding this comment

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

Can we have the assumption that when home is set, it must be true?

Copy link
Contributor Author

@Hailong-am Hailong-am Sep 5, 2024

Choose a reason for hiding this comment

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

Yes, i think so. home is not a defined property on ChromeBreadcrumb, ideally nobody else will set this property

Copy link
Member

@zhongnansu zhongnansu left a comment

Choose a reason for hiding this comment

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

lgtm

@SuZhou-Joe
Copy link
Member

Run cypress tests (osd:ciGroup6) should be irrelevant to the code changes.

@SuZhou-Joe SuZhou-Joe merged commit 63d0d32 into opensearch-project:main Sep 5, 2024
68 of 69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 5, 2024
* hide first home breadcrumbs within workspace

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

* Changeset file for PR #7992 created/updated

* don't relay on text to drop home

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

* don't relay on text to drop home

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 63d0d32)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 5, 2024
…ce (#8015)

* [Workspace] Hide first home breadcrumbs within workspace (#7992)

* hide first home breadcrumbs within workspace

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

* Changeset file for PR #7992 created/updated

* don't relay on text to drop home

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

* don't relay on text to drop home

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 63d0d32)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix 2.x issue (#8021)

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

---------

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>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2024
…ce (#8015)

* [Workspace] Hide first home breadcrumbs within workspace (#7992)

* hide first home breadcrumbs within workspace

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

* Changeset file for PR #7992 created/updated

* don't relay on text to drop home

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

* don't relay on text to drop home

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 63d0d32)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix 2.x issue (#8021)

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

---------

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>
Co-authored-by: Hailong Cui <ihailong@amazon.com>
(cherry picked from commit ee2656b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Sep 6, 2024
…ce (#8015) (#8050)

* [Workspace] Hide first home breadcrumbs within workspace (#7992)

* hide first home breadcrumbs within workspace



* Changeset file for PR #7992 created/updated

* don't relay on text to drop home



* don't relay on text to drop home



---------



(cherry picked from commit 63d0d32)


* fix 2.x issue (#8021)



---------






(cherry picked from commit ee2656b)

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>
Co-authored-by: Hailong Cui <ihailong@amazon.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