-
Notifications
You must be signed in to change notification settings - Fork 858
[Flyout System] Add managed history controls #9003
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
[Flyout System] Add managed history controls #9003
Conversation
Co-authored-by: Tim Sullivan <[email protected]> Co-authored-by: Timothy Sullivan <[email protected]> Co-authored-by: Weronika Olejniczak <[email protected]>
1dac84e
to
3331dce
Compare
@clintandrewhall I removed the problematic |
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.
A few nits, but looks good to me. Approving to unblock.
Great work!
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.
Only a suggestion for the changelog, and translations in EuiFlyoutMenu
. I tested the feature locally and it's working as expected.
<EuiButtonEmpty size="xs" color="text" {...props}> | ||
<EuiIcon type="editorUndo" /> Back | ||
</EuiButtonEmpty> |
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.
I don't know if you'd like to add translations now, but here's a suggestion (you'd need to adjust imports) — also, the icon can be part of EuiButtonEmpty
✨
<EuiButtonEmpty size="xs" color="text" {...props}> | |
<EuiIcon type="editorUndo" /> Back | |
</EuiButtonEmpty> | |
<EuiButtonEmpty size="xs" color="text" iconType="editorUndo" {...props}> | |
<EuiI18n token="euiFlyoutMenu.back" default="Back" /> | |
</EuiButtonEmpty> |
return ( | ||
<EuiPopover | ||
button={ | ||
<EuiButtonIcon iconType="arrowDown" color="text" aria-label="History" /> |
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.
<EuiButtonIcon iconType="arrowDown" color="text" aria-label="History" /> | |
<EuiButtonIcon iconType="arrowDown" color="text" aria-label={useEuiI18n('euiFlyoutMenu.history', 'History')} /> |
@@ -0,0 +1 @@ | |||
[Flyout System] Added back button, history stack managed history controls. Added history navigation events. |
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.
I think this would more alined with how changelogs are written in EUI, but feel free to take it or not. I think the important bit is having at least 1 bullet point and start with either "Added" or "Updated", while also mentioning the public-facing component affected:
[Flyout System] Added back button, history stack managed history controls. Added history navigation events. | |
- Updated `EuiFlyout` with new `onActive` callback and enable stack managed history controls. | |
- Updated `EuiFlyoutMenu` with new prop `historyItems` and refactored props for back button. |
7101792
to
6cb11fb
Compare
@acstll This is ready for another look! |
💚 Build SucceededHistory
|
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.
🟢 Looks good to merge! Thanks for the updates @tsullivan
💚 Build Succeeded
History
|
Summary
Depends on #8997
Resolves #8873
This exposes tracked history to flyout sessions in contexts and exposes controls in the UI to allow users to navigate to previous flyouts.
When a user opens a flyout for the first time:
onActive
callback (optional prop) is fired.When the user navigates to a previous flyout:
onClose
callbacks are firedonActive
callback for the flyout that becomes active is firedNote: This PR is targeted to the
feat/flyout-system
feature branch.Why are we making this change?
A requirement for the Flyout System is to allow users to navigate to previous flyout sessions. This PR achieves that, and allows consumer apps to have a local state that is synchronized with the internal state of the Flyout System.
Screenshots
A new "Multi-session example" storybook has been added to show the effects of the lifecycle callbacks being called:
Impact to users
Ability to view a list of previous flyout sessions in state, and navigate to those flyout sessions.
QA
Remove or strikethrough items that do not apply to your PR.
General checklist
@default
if default values are missing) and playground toggles