-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discover] [Log Explorer] Add tabs to Discover and Log Explorer #171467
[Discover] [Log Explorer] Add tabs to Discover and Log Explorer #171467
Conversation
cc7b2a6
to
0ec4ac2
Compare
6709374
to
2544be7
Compare
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
The other pending issues you can leave to us as this is all inside Logs Explorer. |
@davismcphee thanks for calling out these issues
|
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.
top nav changes lgmt!
Ok sounds good, I will leave it as is for now then and we can have followup discussions about what to do with the no data screen.
Today when the "Open in Discover" link is clicked, we transfer state from Log Explorer -> Discover, so I haven't changed anything there apart from the Discover link being switched to a Discover tab (except adding Is your opinion that we should continue passing state from Log Explorer -> Discover as we do today, and that we should pass some state from Discover -> Log Explorer (excluding state like
I believe so. I can look into this a bit today, but currently all of Discover is blocked from rendering when there's no data, so all of its internal logic assumes there's data available. It could be tricky to refactor in a way that allows the top nav to render when the no data screen is shown, but I can at least have a look.
I'm not sure I understand this point. The logic I'm currently using is the explicit state passing from "Open in Discover" that exists today. Are you saying we should drop the existing functionality and just always reset the state to the defaults when navigating between tabs instead? We can do this, but I worry it would unfriendly and unexpected to users to lose all state just by switching tabs (but I guess at least a clever user who accidentally cleared their changes by switching tabs could use the browser back button to restore their old state). |
@weltenwort So I looked into it today, and while it still required quite a bit of refactoring, it wasn't as bad as I thought it would be to get the tabs and no data screen showing in serverless. Rather than pulling the no data screen deeper into Discover like I thought we'd need to, I was instead able to pull the serverless top nav up to where the no data screen is rendered without too much difficulty. It probably still has some bugs currently, and I definitely broke some tests, but I pushed what I have so far in e1d6a3f and it seems to be working well for the most part. I'll follow up after the weekend to address any bugs it created and fix up the tests. |
That's great! This is what I meant. Sorry for causing confusion here, apparently I didn't read the PR carefully enough.
🎉 neat, thank you |
7dc6639
to
c0448db
Compare
c0448db
to
a44af6e
Compare
@weltenwort no worries, sounds like we're on the same page! Also I fixed the broken tests from the no data change and things should be back in a reviewable state now. |
@davismcphee Sorry for the delayed comment here, we were on the UX offsite. From a UX perspective, I want to +1 on Julia's comment above. So not passing state and perhaps keeping the |
+1 @andreadelrio (et al) I suspect (hope?) we move toward tabs becoming a user-defined concept that aligns to a (singular) saved query/search... providing a 1:1 between a tab and query/search. If we go that route, then state transfer would not be expected. In that world, we may also be able to split experiences along 'modes' and have each tab set to a mode (e.g. ES|QL, data views, Logs exp/data sets, etc.). |
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 all for the feedback! It seems like everyone is aligned with removing the current state syncing, so I've updated the PR to not sync any state between tabs and always navigate to the application root URLs. I've also re-added the "Open in Discover" button, although I'm not sure what that should look like design wise, so I'm open to any suggestions:
@andreadelrio Works for me! And we do a few places (e.g. Add Sample Data screen, opening an index in Discover from Index Management, etc.), but not a whole lot that I've noticed. How does this look? |
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.
Code changes LGTM 👍
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.
The changes to the Logs Explorer LGTM, thanks for taking this on ❤️ I'll reserve any judgement on the Discover changes 😉
I noticed some state restoration weirdness when clicking the tabs, but I'm pretty sure that's on us and our locator. Since #170200 will change the internals of the locator anyway, I don't think this is anything we'll have to resolve here.
src/plugins/discover/public/components/log_explorer_tabs/log_explorer_tabs.tsx
Outdated
Show resolved
Hide resolved
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.
Design changes LGTM, thanks!
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.
Obs ux management changes LGTM! (code review only)
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Canvas Sharable Runtime
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @davismcphee |
Commenting late on this PR as I am working on part of the code that touches the changes here. It is much harder for me now to bring the changes brought in this PR in a non serverless environment (stateful Kibana). Not sure what can be done at this stage but wanted to leave the comment to limit future changes in that direction (and maybe even refactor at some point). |
@sebelga Apologies for such a delay following up on this. Just wanted to give you a heads up that we're currently doing more work related to this in Discover, and I just merged a PR which gets rid of the serverless plugin dependency and instead replaces it with a |
Awesome @davismcphee ! Thanks for making those changes 🎉 |
Summary
This PR adds tabs to navigate between Discover and Log Explorer in serverless O11y projects. The Discover top nav should remain unchanged in stateful deployments and all other serverless project types:
Important
While writing tests for this, I encountered a few issues we'll probably want to discuss and make decisions for before merging this PR.
Notes
sort
as well (I can revert this if it's unwanted).Part of #169964. In order to fully resolve this issue, there is still a remaining task to remove the "Data Views" tab from the Log Explorer dataset selector.
Part of #171386. In order to fully resolve this issue, it looks like there may be some documentation work to do (especially since "Log Explorer" has been named to "Logs Explorer" in the UI).
Checklist
For maintainers