-
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
[Security Solution][Alerts] Make rule preview flyout resizable #147351
[Security Solution][Alerts] Make rule preview flyout resizable #147351
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@ARWNightingale could you check these changes from UI/UX perspective please? We decided to move from having Rule Preview in EuiFlyout to EuiResizableContainer. There were a few issues with flyout component, so we decided to replace it. You can see changes in video recording in description and if you'd like to play with the current state then you can use cloud deployment (let me know if you need help with that). |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
I am just checking with the EUI team in regards to another way we can action the interaction. For me it seems very hidden that the feature is there. Maybe we can just use another button to trigger the container. |
@e40pud I have spoken to the EUI team and we can trigger the container using toggles like this. I suggest we add a toggle that replaces the existing button (pre-exiting rule preview button that was sitting on the top right). This would reduce learning new behaviour for our users. we can still keep the collapse and expand options too. https://elastic.github.io/eui/#/layout/resizable-container#collapsible-panels-with-external-control |
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.
Checked out, tested locally, code reviewed and overall functionality LGTM! 🎉 👍 Keyboard navigation works as expected (minus this other bug I found), and reflow perf seems reasonable given the content on the screen.
As @ARWNightingale commented, I agree it would be a good idea to bring back the preview button and have its action be the external control for showing/hiding preview container.
Additionally, a few small UI nits:
- The min-size on the preview container allows for cutoff of the datepicker action button. Consider increasing the min-width ever so slightly. Or perhaps this is an overflow issue with the timepicker component?
- If min-height is less than ~870px, the resize icon isn't displayed (since it's mid-way of total page height). Not a big deal once we move back to the dedicated button, and really only an issue when needing to collapse since the bar itself can be used to expand (but only the icon to collapse).
- Would be nice if we could have the resize-bar extend to the edge of the page on the right (and perhaps the top/bottom of the page as well), but I understand we're working within the
SecurityPageWrapper
component which is adding this 24px padding. Just looks a little weird floating there (IMO) when comparing to the EUI examples. Not a huge deal either way.
edit: maybe this isn't so bad after all, as it prevents mis-clicks on the scroll bar, and won't be the only CTA for opening the panel once we add the button back. Please ignore this one... 😅
@elasticmachine merge upstream |
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.
@e40pud, thanks for this improvement. It looks good code wise and I have few questions regarding user experience
- Agree on returning back Preview button, it might not be easy for users to open preview back, once it's closed without Preview button.
- Maybe we can add a tooltip when preview section is closed when you navigate over closed resize bar? I'm not sure 100% sure it a something worth to do, but we could consider it
Screen.Recording.2023-01-05.at.11.35.38.mov
- On small resolution new implementation become difficult to use
Here is old implementation with flyout:
Maybe stacking it on each other on small resolution can be viable solution? It seems could be implemented easier than introducing overlay on that resolution. Although, if it possible, I would prefer overlay on small screens and resizable implementation on bigger
@elasticmachine merge upstream |
@spong @vitaliidm As Alex suggested, I returned the Rule Preview button which fixed most of the concerns. We might need to fix the issue with extremely small screens, though I feel like we could do that in a separate PR. @vitaliidm we cannot really switch from resizable component to overlayed flyout component as it will introduce bigger issues with state being vanished. We already have that issue with the current implementation when user decreases the size of the window to a very narrow one. In that case flyout changes type from pushed to overlayed automatically and removes all the Rule Preview content. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
I've noticed Preview Button is absent on Rule Edit page
I've been thinking of using https://elastic.github.io/eui/#/layout/flex for this purpose, but I don't know how that would work with resizable container. Can you please create a ticket to address small screen issue? |
@elasticmachine merge upstream |
@vitaliidm Good catch with the Rule editing page! Fixed that. Also, here is the ticket to cover UI issues mentioned above. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @e40pud |
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 for addressing comments
Good catch with the Rule editing page!
Some simple e2e tests could've been very handy here. Do you know if we have any tickets to increase tests coverage for rule preview?
@vitaliidm not that I'm aware of. Here is the ticket that I created to track tests coverage for Rule Preview feature. |
…ic#147351) ## Summary This PR makes Rule Preview component resizable. https://user-images.githubusercontent.com/2700761/211618879-81be1065-09d0-4d9b-be41-04ba87e707c6.mov Closes elastic#146847 Co-authored-by: Kibana Machine <[email protected]>
Summary
This PR makes Rule Preview component resizable.
Screen.Recording.2023-01-10.at.18.18.20.mov
Closes #146847