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

[Serverless] Improve cases breadcrumbs in oblt project #169401

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Oct 19, 2023

Summary

partially fixes #161447

Fixed "Create Case" and "Manage Cases" breadcrumbs

fix.cases.breadcrumbs.mov

@Dosant Dosant changed the title improve oblt case breadcrumbs [Serverless] Improve cases breadcrumbs in oblt project Oct 19, 2023
@Dosant Dosant requested a review from cnasikas October 19, 2023 14:01
@@ -59,7 +59,7 @@ function getNodeStatus(
if (!hasUserAccessToCloudLink()) return 'remove';
}

if (deepLink && deepLink.hidden) return 'remove';
if (deepLink && deepLink.hidden) return 'hidden';
Copy link
Contributor Author

@Dosant Dosant Oct 19, 2023

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok 👍

@Dosant Dosant requested a review from sebelga October 19, 2023 14:07
@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Project:Serverless Work as part of the Serverless project for its initial release Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) labels Oct 19, 2023
@Dosant Dosant marked this pull request as ready for review October 19, 2023 14:08
@Dosant Dosant requested review from a team as code owners October 19, 2023 14:08
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Member

@cnasikas cnasikas left a 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

Serverless
Screenshot 2023-10-19 at 7 09 52 PM

Screenshot 2023-10-19 at 7 09 44 PM

ESS
Screenshot 2023-10-19 at 7 07 55 PM

Screenshot 2023-10-19 at 7 07 48 PM

cc @semd

@Dosant
Copy link
Contributor Author

Dosant commented Oct 23, 2023

@cnasikas, thanks!

In serverless the texts are coming from deep links definition:

{
title: i18n.translate('xpack.cases.navigation.create', {
defaultMessage: 'Create New Case',
}),
...(extend[CasesDeepLinkId.casesCreate] ?? {}),
id: CasesDeepLinkId.casesCreate,
path: getCreateCasePath(basePath),
},
{
title: i18n.translate('xpack.cases.navigation.configure', {
defaultMessage: 'Configure Cases',
}),
...(extend[CasesDeepLinkId.casesConfigure] ?? {}),
id: CasesDeepLinkId.casesConfigure,
path: getCasesConfigurePath(basePath),
},

where in ESS it is from whatever is imperatively set to core.setBreadcrumbs()

@Dosant
Copy link
Contributor Author

Dosant commented Oct 23, 2023

@elasticmachine merge upstream

@cnasikas
Copy link
Member

cnasikas commented Oct 23, 2023

I see! Thanks @Dosant. We will take care of this difference in the texts.

Copy link
Contributor

@sebelga sebelga left a 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;
Copy link
Contributor

@sebelga sebelga Oct 23, 2023

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

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

Choose a reason for hiding this comment

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

Ok 👍

@Dosant Dosant requested a review from sebelga October 23, 2023 12:38
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Osquery Cypress Tests #3 / ALL - Live Query should run multiline query should run multiline query

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolutionServerless 333.2KB 333.2KB +50.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
serverlessObservability 59.7KB 59.8KB +170.0B
serverlessSearch 46.2KB 46.3KB +50.0B
total +220.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Dosant Dosant merged commit b7e2893 into elastic:main Oct 23, 2023
34 checks passed
@kibanamachine kibanamachine added v8.12.0 backport:skip This commit does not require backporting labels Oct 23, 2023
js-jankisalvi added a commit that referenced this pull request Oct 24, 2023
## 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)
js-jankisalvi added a commit to js-jankisalvi/kibana that referenced this pull request Oct 24, 2023
## 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
js-jankisalvi added a commit that referenced this pull request Oct 25, 2023
#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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Chrome Core's Chrome UI (sidenav, header, breadcrumbs) Project:Serverless Work as part of the Serverless project for its initial release release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[o11y alerting serverless] Incomplete breadcrumbs
6 participants