-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Serverless] Improve cases breadcrumbs in oblt project #169401
[Serverless] Improve cases breadcrumbs in oblt project #169401
Conversation
@@ -59,7 +59,7 @@ function getNodeStatus( | |||
if (!hasUserAccessToCloudLink()) return 'remove'; | |||
} | |||
|
|||
if (deepLink && deepLink.hidden) return 'remove'; | |||
if (deepLink && deepLink.hidden) return 'hidden'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebelga, the newly added
{
link: 'observability-overview:cases_configure',
},
{
link: 'observability-overview:cases_create',
},
are used for the breadcrumbs, but their deep links are "hidden".
The fix I did is to keep such links in the navigation tree for the breadcrumbs, but filter them out when rendering the side nav to keep them hidden from the navigation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 👍
Pinging @elastic/appex-sharedux (Team:SharedUX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested on Serverless (all projects) and in ESS (all solutions) and is working as expected! Probably unrelated to this PR but I noticed that the text is different in the breadcrumbs between Serverless and ESS
cc @semd
@cnasikas, thanks! In serverless the texts are coming from deep links definition: kibana/x-pack/plugins/cases/public/common/navigation/deep_links.ts Lines 34 to 49 in 3730dd0
where in ESS it is from whatever is imperatively set to core.setBreadcrumbs() |
@elasticmachine merge upstream |
I see! Thanks @Dosant. We will take care of this difference in the texts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, just one change on where the conditional statement should be placed
@@ -194,6 +194,7 @@ export const DefaultNavigation: FC<ProjectNavigationDefinition & Props> = ({ | |||
} | |||
|
|||
if (isGroupDefinition(navNode)) { | |||
if (navNode.sideNavStatus === 'hidden') return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be here. Remember that all the definition prop can also be added to the components (if the consumer decide to build the tree with UI components), so Navigation.Group
in this case.
You need to add this if
statement here:
https://github.com/elastic/kibana/blob/main/packages/shared-ux/chrome/navigation/src/ui/components/navigation_group.tsx#L84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Seb! I moved the condition
@@ -59,7 +59,7 @@ function getNodeStatus( | |||
if (!hasUserAccessToCloudLink()) return 'remove'; | |||
} | |||
|
|||
if (deepLink && deepLink.hidden) return 'remove'; | |||
if (deepLink && deepLink.hidden) return 'hidden'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
## Summary fixes #169213 This PR updates route and deeplink breadcrumb from `Configure cases ` to `Settings`. It also updates bread crumb text for serverless as mentioned in #169401 (review) ![image](https://github.com/elastic/kibana/assets/117571355/94b8a0b8-9842-4570-a2e0-fd7c9b42bcb4) ![image](https://github.com/elastic/kibana/assets/117571355/65666e53-1b61-4088-bf65-87fef6dd70bd) ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
## Summary fixes elastic#169213 This PR updates route and deeplink breadcrumb from `Configure cases ` to `Settings`. It also updates bread crumb text for serverless as mentioned in elastic#169401 (review) ![image](https://github.com/elastic/kibana/assets/117571355/94b8a0b8-9842-4570-a2e0-fd7c9b42bcb4) ![image](https://github.com/elastic/kibana/assets/117571355/65666e53-1b61-4088-bf65-87fef6dd70bd) ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) (cherry picked from commit 68b2e4d) # Conflicts: # x-pack/test_serverless/functional/test_suites/observability/navigation.ts
#169680) # Backport This will backport the following commits from `main` to `8.11`: - [[Cases] Update configure cases breadcrumb to settings (#169532)](#169532) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Janki Salvi","email":"117571355+js-jankisalvi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-10-24T16:01:19Z","message":"[Cases] Update configure cases breadcrumb to settings (#169532)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/169213\r\n\r\nThis PR updates route and deeplink breadcrumb from `Configure cases ` to\r\n`Settings`.\r\n\r\nIt also updates bread crumb text for serverless as mentioned in\r\nhttps://github.com//pull/169401#pullrequestreview-1688154396\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/94b8a0b8-9842-4570-a2e0-fd7c9b42bcb4)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/65666e53-1b61-4088-bf65-87fef6dd70bd)\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"68b2e4d835541cc46231129dfcbb5448eeabc42c","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:ResponseOps","Feature:Cases","v8.11.0","v8.12.0"],"number":169532,"url":"https://github.com/elastic/kibana/pull/169532","mergeCommit":{"message":"[Cases] Update configure cases breadcrumb to settings (#169532)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/169213\r\n\r\nThis PR updates route and deeplink breadcrumb from `Configure cases ` to\r\n`Settings`.\r\n\r\nIt also updates bread crumb text for serverless as mentioned in\r\nhttps://github.com//pull/169401#pullrequestreview-1688154396\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/94b8a0b8-9842-4570-a2e0-fd7c9b42bcb4)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/65666e53-1b61-4088-bf65-87fef6dd70bd)\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"68b2e4d835541cc46231129dfcbb5448eeabc42c"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169532","number":169532,"mergeCommit":{"message":"[Cases] Update configure cases breadcrumb to settings (#169532)\n\n## Summary\r\n\r\nfixes https://github.com/elastic/kibana/issues/169213\r\n\r\nThis PR updates route and deeplink breadcrumb from `Configure cases ` to\r\n`Settings`.\r\n\r\nIt also updates bread crumb text for serverless as mentioned in\r\nhttps://github.com//pull/169401#pullrequestreview-1688154396\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/94b8a0b8-9842-4570-a2e0-fd7c9b42bcb4)\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/117571355/65666e53-1b61-4088-bf65-87fef6dd70bd)\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"68b2e4d835541cc46231129dfcbb5448eeabc42c"}}]}] BACKPORT-->
Summary
partially fixes #161447
Fixed "Create Case" and "Manage Cases" breadcrumbs
fix.cases.breadcrumbs.mov