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

[Logs Explorer] Change the default link for "Discover" in the serverless nav #173420

Merged
merged 10 commits into from
Jan 3, 2024

Conversation

weltenwort
Copy link
Member

📓 Summary

This changes the navigation target of the "Discover" sidebar menu in the observability serverless project type to be the Logs Explorer.

cc @ruflin

@weltenwort weltenwort self-assigned this Dec 14, 2023
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@weltenwort weltenwort added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team Feature:LogsExplorer Logs Explorer feature labels Dec 14, 2023
@weltenwort

This comment was marked as outdated.

@weltenwort

This comment was marked as outdated.

@weltenwort

This comment was marked as outdated.

@weltenwort

This comment was marked as outdated.

@weltenwort
Copy link
Member Author

@davismcphee I'd appreciate your help with something:

There is this test at https://github.com/weltenwort/kibana/blob/8268407ed15c64ba2f4125ca6519ccff4fc2236a/x-pack/test_serverless/functional/test_suites/common/discover/group1/_url_state.ts#L80, which explicitly tests the persistence of some Discover state in the side nav link. Since this PR changes the default target of the side nav entry, the test doesn't work anymore.

Would you say it can be dropped completely or does it cover anything about Discover's state that you'd like to preserve and move elsewhere?

@weltenwort
Copy link
Member Author

cc @elastic/kibana-data-discovery ☝️ 😇

@jughosta
Copy link
Contributor

cc @elastic/kibana-data-discovery ☝️ 😇

It's a test to check that filters (including pinned filters) are carried over correctly. Can it also work for Logs Explorer link? Would be great to keep the test for ES and Security projects at least.

@weltenwort
Copy link
Member Author

Can it also work for Logs Explorer link?

No, the Logs Explorer doesn't persist its state globally that way. If we're going to implement something similar we'd probably use the LocalStorage approach as it is less entangled with the chrome service.

@weltenwort
Copy link
Member Author

Would be great to keep the test for ES and Security projects at least.

I didn't even know there are tests that are executed for every serverless project type. Do you know how to limit them to a sub-set?

@jughosta
Copy link
Contributor

I think we would need to move the tests from common directory to search and security.

@weltenwort
Copy link
Member Author

/ci

@weltenwort weltenwort marked this pull request as ready for review December 20, 2023 20:28
@weltenwort weltenwort requested review from a team as code owners December 20, 2023 20:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

Copy link
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

Data Discovery changes LGTM 👍

link: 'discover',
link: 'observability-log-explorer',
// prevent this entry from ever becoming active, effectively falling through to the obs-log-explorer child
getIsActive: () => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want ever to mark this link as active?

Copy link
Member Author

Choose a reason for hiding this comment

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

The menu hierarchy here is:

  • Logs Explorer, which is never active and hides its breadcrumb, but needed so the Logs Explorer is the default tab
  • Discover, which is needed so Discover shows up in the breadcrumbs and the entry is active when in Discover
  • Logs Explorer, which is needed so the breadcrumbs are Discover / Logs Explorer and the entry is also active when in the Logs Explorer

It's the only way I found to get the serverless nav and breadcrumbs to behave that way. If you know of any other approach to achieve the same thing I'd gladly adopt it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just checked and indeed the way multiple active node paths (here you have 2 pointing to the observability-log-explorer link) are declared forces you to do this. I'll open a PR to fix it in the serverless nav so you don't need to hack it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be great. Would you prefer us to wait for your change or shall I align with it in a follow-up?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry just reading now. All good in opened my PR after you merged 👍
#174184

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

This changes the navigation target of the "Discover" sidebar menu in the observability serverless project type to be the Logs Explorer.

Based on the PR description, I expected to see the Logs Explorer view, but I still saw the Discover tab, and the URL path is /app/discover. Is this expected?

@weltenwort
Copy link
Member Author

@maryam-saeidi The goal is that the Discover tab is still there, but the Logs Explorer tab is the default. Are you seeing a different behavior in your tests?

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 👍 I'll open a PR for my comment about getIsActive()

link: 'discover',
link: 'observability-log-explorer',
// prevent this entry from ever becoming active, effectively falling through to the obs-log-explorer child
getIsActive: () => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

I just checked and indeed the way multiple active node paths (here you have 2 pointing to the observability-log-explorer link) are declared forces you to do this. I'll open a PR to fix it in the serverless nav so you don't need to hack it here.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
serverlessObservability 63.4KB 63.5KB +69.0B

History

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

cc @weltenwort

@weltenwort
Copy link
Member Author

run elasticsearch-ci/docs

@sebelga sebelga self-requested a review January 3, 2024 08:09
Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

Worked as expected 👍🏻

@weltenwort weltenwort merged commit eb83fac into elastic:main Jan 3, 2024
20 checks passed
@weltenwort weltenwort deleted the obs-change-default-discover-tab branch January 3, 2024 11:52
@kibanamachine kibanamachine added v8.13.0 backport:skip This commit does not require backporting labels Jan 3, 2024
jloleysens added a commit that referenced this pull request Jan 4, 2024
* main: (4129 commits)
  [Logs Explorer] Change the default link for "Discover" in the serverless nav (#173420)
  [Fleet] fix unhandled error in agent details when components are missing (#174152)
  [Obs UX] Unskip transaction duration alerts test (#174069)
  [Fleet] Fix keep policies up to date after package install (#174093)
  [Profiling] Stack traces embeddable (#173905)
  [main] Sync bundled packages with Package Storage (#174115)
  [SLO Form] Refactor to use kibana data view component (#173513)
  [Obs UX] Unskip APM Service Inventory Journey (#173510)
  [Obs UX] Unskip preview_chart_error_count test (#173624)
  [api-docs] 2024-01-03 Daily api_docs build (#174142)
  Update babel runtime helpers (#171745)
  Handle content stream errors in report pre-deletion (#173792)
  [Cloud Posture] [Quick wins] Enable edit DataView on the Misconfigurations Findings Table (#173870)
  [ftr] abort retry on invalid webdriver session (#174092)
  Upgrade openai to 4.24.1 (#173934)
  chore(NA): bump node into v20 (#173461)
  [Security Solution][Endpoint] Fix index name pattern in SentinelOne dev. script (#174105)
  fix versions.json
  [Obs AI Assistant] Add guardrails (#174060)
  [ML] Transforms: Refactor validators and add unit tests. (#173736)
  ...
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:LogsExplorer Logs Explorer feature release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants