-
Notifications
You must be signed in to change notification settings - Fork 860
[EuiFlyoutMenu] add hideTitle prop for “main” flyouts in a session #9150
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
[EuiFlyoutMenu] add hideTitle prop for “main” flyouts in a session #9150
Conversation
b861ad6 to
4967901
Compare
d199818 to
32edff0
Compare
1a14cd0 to
867d6ba
Compare
| ); | ||
|
|
||
| // Set title from flyoutMenuProps or aria-label | ||
| // TODO: allow aria-labelledby references to be used |
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.
Working this TODO is not part of this PR. There's a possibility the element with the id will not be rendered initially, which means we need to have a DOM mutation observer on the flyout content and a new action in the flyout manager reducer to update the title at arbitrary times.
packages/website/docs/components/containers/flyout/session-management.mdx
Outdated
Show resolved
Hide resolved
|
|
41f8990 to
e2b53f0
Compare
20cf2ab to
2704b17
Compare
tkajtoch
left a comment
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 look great and work as expected. I tested the hideTitle prop in Storybook and was able to control the visibility as described.
I'm going to approve this PR now despite the two unresolved comments. Feel free to apply the suggested changes or just skip them for now!
Co-authored-by: Tomasz Kajtoch <[email protected]>
…llivan/eui into flyout-system/fix-main-header-design
💚 Build SucceededHistory
cc @tkajtoch |
💚 Build Succeeded
History
cc @tkajtoch |
Summary
Closes #9148
EuiFlyoutMenuPropshideTitleprop.The default is
truefor "main" system flyouts,falsefor everything elseWhy are we making this change?
This fixes an issue with the initial Flyout System implementation, where "main" flyouts have a title in the menu bar, which is wrong:
EuiFlyoutHeaderis not deprecated and the "main" flyout UI should use it for a heading.On the other hand, "child" flyouts are a new concept and these types of flyouts are designed to have their title text shown in the top menu bar. This makes sense because "main" and "child" flyouts serve different purposes, and their menu bars should also serve different purposes - the main menu bar shows the history controls and not a title; the child menu bar shows the title and not the history controls.
Screenshots #
Impact to users
Before this fix, it was assumed that flyout designs would change from using an
EuiFlyoutHeaderinto a design where the title is in the menu bar - even for "main" system flyouts. Since that assumption was wrong, this fix means there will be an easier migration path from non-managed flyouts into managed flyouts.QA
Remove or strikethrough items that do not apply to your PR.
General checklist
[ ] Checked in both light and dark modes[ ] Checked in mobile@defaultif default values are missing) and playground toggles[ ] Updated visual regression tests[ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)[ ] If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)[ ] If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)