-
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
[ObsUx][Infra] Add collapsible sections in the overview tab #175558
Comments
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
Update: selectors_extra_attributes.mov
In this case, I think we should rather get the count of how many users see the state to be Do you think this will work? Alerts (the closed section content):
Another option is to not show any message when there are no alerts and leave it empty also when the section is collapsed (keeping it simple) and show the message only when the user closes the section and has 1 or more alerts:
Wdyt - Which one is better - cc: @crespocarlos Just FYI: I saw that you are working on the alerts section as well this change can be a conflict probably. |
Hey @jennypavlova,
Thanks for this. Just trying to get an understanding of what the data would look like. Could we break down the data like this with your proposal? Clicks on the expand/section button/legend A single attribute/value which indicates an collapse/expand (regardless of whether it was the legend or the text. I don't think it's worth differentiating between the legend vs the button etc so perhaps it's best to just have a single value for both to simplify things? Did the user expand or collapse a section? I suppose we'd need to correlate the current state of the section with Which section was it? Is it a fly-out or detail page? What type of asset was it? |
Hey @jennypavlova - thanks for thinking about this...I hadn't thought about this! I'm wondering whether we could do something like this? Collapse by default No alerts found (but rename to 'No alerts found') Then, when you expand, we show the proper alert counts and table (see issue for alerts table)? This could be a good use of real-estate? |
Hi @roshan-elastic, Thank you for having a look!
In order to get clicks on both elements (so if we don't want to have a separation between buttons and legend clicks) we can use a selector like
Yes, I looked at this again and I changed the naming a bit to make it easier to navigate (and to avoid the double "section" like in And yes to all other points, so the only change will be: Did the user expand or collapse a section? Alerts: no_active_alerts.movI got your point about showing the same widget with the alert count but we can't control the styles (as we just use the alerts widget here) so it will look like this: alerts_widget.mov |
Update: I checked and I can also get the recovered alerts count so we can have the total first similar to the alerts widget: What I don't like about this is that we are basically creating the same component as the provided alerts summary widget (if we add the closed content above with some styling) |
Hey @jennypavlova,
Could we decouple the section from the action of clicking on the collapse/expand and just have the I'm pretty sure that the telemetry will automatically inherit the For example, here is a sample event where you can see that Could the |
@jennypavlova - You know what, that's probably a better idea. So in summary, we could do something like:
I like this because you would see no 'red' unless there are active alerts (and in that case, it'll be expanded so you can see the problems at a glance). That would limit customisation to a minimum? I think it's a good assumption you have that users don't care about alerts if they're not active (at least not enough for to push them in the UI). Is this more what you had in mind? |
@jennypavlova do you think it would be possible for the component above, could send via |
@crespocarlos I am trying to understand the suggestion here. So I am dropping the alerts count in the closed state if there are active alerts, keeping only the content when there are no active alerts and set open/closed state only after we load the widget, is that the idea? alerts_only_no_alerts_collapsed_1080.movWith this change we are still doing the http request I don't see an option to skip it 🤔 The benefit is maybe that we set the 'open'/'closed' state open by default and change it to closed after we load the section. I am thinking now that we can only try to get alerts count with the hook inside the parent and if there are no alerts at all to not render the alerts widget and to close the section (so we will do the request to get the count only and we won't render the Edit: Added a commit to show the change so we can discuss further [WIP version until we decide is we want to keep it] |
Hey @jennypavlova
My first idea was to see if the
Yeah, this sounds correct :)
We would still make a second request when opening the section. I'd expect to be able to make a single request if the alerts widget returned the counter. The same flow that you've already put together in your draft PR would remain the same. What I'm thinking that we might be able to do, provided that the 1 - Open the flyout Wdyt? |
That would help a lot but I don't think we can do that - maybe we can check with the team who owns the widget and see if we can have something like that (maybe a separate prop because I saw that
That's true, we need the request now because we don't have the count returned from the widget - I also checked if there is a function providing the count inside TriggersAndActionsUIPublicPluginStart but I couldn't find anything we can use. @crespocarlos I am not sure if I should split this actually and keep a PR for the basic section implementation and investigate this alerts widget further: so we won't have the text when the section is closed and the section will be open by default so we can avoid having the second request in the first PR and I can add a followup issue for this as it's not something we can do directly on our own. Wdyt? |
@roshan-elastic I can change it from a section specific like this: I wasn't sure if that is useful but as you said you can have the id of the section and the state together with the generic data-test-subj and combine them to get the results Edit: Updated the telemetry section in the issue description as well |
Sounds good @jennypavlova! We could also timebox this investigation so we don't spend too much time on it. |
Hey @jennypavlova, This looks perfect:
This is really nice! |
@crespocarlos Good idea: I added an issue (#175989) and a ❓ next to the timebox, feel free to update the description if you have some ideas (also for a reasonable timebox for the investigation) |
Closes #175558 ## Summary This PR makes all asset details overview sections collapsible. All sections will be always open by default and the user should be able to expand/collapse a section. <img width="300" alt="Screenshot 2024-02-01 at 12 04 24" src="https://github.com/elastic/kibana/assets/14139027/b91a190a-eaec-4031-8591-f11a3a04f201"> <img width="300" alt="Screenshot 2024-02-01 at 12 03 50" src="https://github.com/elastic/kibana/assets/14139027/9d8c20fc-3a27-481c-89ad-1fd7f0e6df47"> ## Testing 1. Open Host view 2. Open the hosts flyout and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/27a6df67-c560-42d6-9166-a8f45880cf8e 3. Open the asset details page and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/f7225ddd-c2a3-4a7b-b520-22acb41e9080
Closes elastic#175558 ## Summary This PR makes all asset details overview sections collapsible. All sections will be always open by default and the user should be able to expand/collapse a section. <img width="300" alt="Screenshot 2024-02-01 at 12 04 24" src="https://github.com/elastic/kibana/assets/14139027/b91a190a-eaec-4031-8591-f11a3a04f201"> <img width="300" alt="Screenshot 2024-02-01 at 12 03 50" src="https://github.com/elastic/kibana/assets/14139027/9d8c20fc-3a27-481c-89ad-1fd7f0e6df47"> ## Testing 1. Open Host view 2. Open the hosts flyout and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/27a6df67-c560-42d6-9166-a8f45880cf8e 3. Open the asset details page and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/f7225ddd-c2a3-4a7b-b520-22acb41e9080
Closes #175989 ## Summary This PR is a follow-up to #175558. It adds the active alerts count next to the alert section title (this will happen after the alerts widget is loaded) following the rules: Default behaviour No alerts at all ==> Collapse and say 'No active alerts' No active alerts ==> Collapse and say 'No active alerts' Active alerts ==> Expand fully Collapsed No alerts at all ==> Say 'No active alerts' No active alerts ==> Say 'No active alerts' Active alerts ==> say "X active alerts" It adds a change in the `AlertSummaryWidget` to make it possible to get the alerts count after the widget is loaded using a new prop. This PR also changes the alerts tab active alert count badge color on the hosts view to keep it consistent: | Before | After | | ------ | ------ | | <img width="242" alt="image" src="https://github.com/elastic/kibana/assets/14139027/85beec43-6522-4d58-a808-d3f7ec3e0759"> | <img width="263" alt="image" src="https://github.com/elastic/kibana/assets/14139027/43983493-3270-471a-8788-40ce38bed334"> | ## Testing - Open hosts view and select a host with active alerts (flyout or full page) - The alerts section should be expanded showing the alerts widget <img width="1920" alt="image" src="https://github.com/elastic/kibana/assets/14139027/f851c914-96cf-475f-bab3-dddc485405ec">fd1a21035a5f) - Collapse the alerts section by clicking on the title or the button: <img width="1917" alt="image" src="https://github.com/elastic/kibana/assets/14139027/e23e09ed-a781-4961-b592-6f13f539c316"> - Open hosts view and select a host without active alerts (flyout or full page) - The alerts section should be collapsed showing the message 'No active alerts' ![Image](https://github.com/elastic/obs-infraobs-team/assets/14139027/7077d3b3-c020-4be5-a3da-b46dda0d3ae0) https://github.com/elastic/kibana/assets/14139027/4058ed69-95f5-4b4c-8925-6680ac3791c1
Closes elastic#175558 ## Summary This PR makes all asset details overview sections collapsible. All sections will be always open by default and the user should be able to expand/collapse a section. <img width="300" alt="Screenshot 2024-02-01 at 12 04 24" src="https://github.com/elastic/kibana/assets/14139027/b91a190a-eaec-4031-8591-f11a3a04f201"> <img width="300" alt="Screenshot 2024-02-01 at 12 03 50" src="https://github.com/elastic/kibana/assets/14139027/9d8c20fc-3a27-481c-89ad-1fd7f0e6df47"> ## Testing 1. Open Host view 2. Open the hosts flyout and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/27a6df67-c560-42d6-9166-a8f45880cf8e 3. Open the asset details page and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/f7225ddd-c2a3-4a7b-b520-22acb41e9080
…175716) Closes elastic#175989 ## Summary This PR is a follow-up to elastic#175558. It adds the active alerts count next to the alert section title (this will happen after the alerts widget is loaded) following the rules: Default behaviour No alerts at all ==> Collapse and say 'No active alerts' No active alerts ==> Collapse and say 'No active alerts' Active alerts ==> Expand fully Collapsed No alerts at all ==> Say 'No active alerts' No active alerts ==> Say 'No active alerts' Active alerts ==> say "X active alerts" It adds a change in the `AlertSummaryWidget` to make it possible to get the alerts count after the widget is loaded using a new prop. This PR also changes the alerts tab active alert count badge color on the hosts view to keep it consistent: | Before | After | | ------ | ------ | | <img width="242" alt="image" src="https://github.com/elastic/kibana/assets/14139027/85beec43-6522-4d58-a808-d3f7ec3e0759"> | <img width="263" alt="image" src="https://github.com/elastic/kibana/assets/14139027/43983493-3270-471a-8788-40ce38bed334"> | ## Testing - Open hosts view and select a host with active alerts (flyout or full page) - The alerts section should be expanded showing the alerts widget <img width="1920" alt="image" src="https://github.com/elastic/kibana/assets/14139027/f851c914-96cf-475f-bab3-dddc485405ec">fd1a21035a5f) - Collapse the alerts section by clicking on the title or the button: <img width="1917" alt="image" src="https://github.com/elastic/kibana/assets/14139027/e23e09ed-a781-4961-b592-6f13f539c316"> - Open hosts view and select a host without active alerts (flyout or full page) - The alerts section should be collapsed showing the message 'No active alerts' ![Image](https://github.com/elastic/obs-infraobs-team/assets/14139027/7077d3b3-c020-4be5-a3da-b46dda0d3ae0) https://github.com/elastic/kibana/assets/14139027/4058ed69-95f5-4b4c-8925-6680ac3791c1
Closes elastic#175558 ## Summary This PR makes all asset details overview sections collapsible. All sections will be always open by default and the user should be able to expand/collapse a section. <img width="300" alt="Screenshot 2024-02-01 at 12 04 24" src="https://github.com/elastic/kibana/assets/14139027/b91a190a-eaec-4031-8591-f11a3a04f201"> <img width="300" alt="Screenshot 2024-02-01 at 12 03 50" src="https://github.com/elastic/kibana/assets/14139027/9d8c20fc-3a27-481c-89ad-1fd7f0e6df47"> ## Testing 1. Open Host view 2. Open the hosts flyout and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/27a6df67-c560-42d6-9166-a8f45880cf8e 3. Open the asset details page and go to the overview tab - All sections should be collapsible - All section buttons should be clickable https://github.com/elastic/kibana/assets/14139027/f7225ddd-c2a3-4a7b-b520-22acb41e9080
…175716) Closes elastic#175989 ## Summary This PR is a follow-up to elastic#175558. It adds the active alerts count next to the alert section title (this will happen after the alerts widget is loaded) following the rules: Default behaviour No alerts at all ==> Collapse and say 'No active alerts' No active alerts ==> Collapse and say 'No active alerts' Active alerts ==> Expand fully Collapsed No alerts at all ==> Say 'No active alerts' No active alerts ==> Say 'No active alerts' Active alerts ==> say "X active alerts" It adds a change in the `AlertSummaryWidget` to make it possible to get the alerts count after the widget is loaded using a new prop. This PR also changes the alerts tab active alert count badge color on the hosts view to keep it consistent: | Before | After | | ------ | ------ | | <img width="242" alt="image" src="https://github.com/elastic/kibana/assets/14139027/85beec43-6522-4d58-a808-d3f7ec3e0759"> | <img width="263" alt="image" src="https://github.com/elastic/kibana/assets/14139027/43983493-3270-471a-8788-40ce38bed334"> | ## Testing - Open hosts view and select a host with active alerts (flyout or full page) - The alerts section should be expanded showing the alerts widget <img width="1920" alt="image" src="https://github.com/elastic/kibana/assets/14139027/f851c914-96cf-475f-bab3-dddc485405ec">fd1a21035a5f) - Collapse the alerts section by clicking on the title or the button: <img width="1917" alt="image" src="https://github.com/elastic/kibana/assets/14139027/e23e09ed-a781-4961-b592-6f13f539c316"> - Open hosts view and select a host without active alerts (flyout or full page) - The alerts section should be collapsed showing the message 'No active alerts' ![Image](https://github.com/elastic/obs-infraobs-team/assets/14139027/7077d3b3-c020-4be5-a3da-b46dda0d3ae0) https://github.com/elastic/kibana/assets/14139027/4058ed69-95f5-4b4c-8925-6680ac3791c1
Summary
We want to make the overview tab sections within asset fly-outs/detail views collapsable to make better use of screen space and reduce overwhelming users with detail.
Design
https://www.figma.com/file/XBVpHX6pOBaTPoGHWhEQJH/Infra-Obs---Flyout-designs?type=design&node-id=1585%3A135948&mode=design&t=PmXdnVkdPzJFe4ka-1
Telemetry
data-section-state="collapsed/expanded"changed todata-section-state="open/closed"
to match accordion terminologydata-test-subj="infraAssetDetailsCollapseExpandSection"
data-test-subj="infraAssetDetailsCollapseExpandSection"
data-test-subj="infraAssetDetailsCollapseExpandSection"
data-test-subj="infraAssetDetailsCollapseExpandSection"
AC
The text was updated successfully, but these errors were encountered: