-
Notifications
You must be signed in to change notification settings - Fork 53
feat(Toolbar): support for a popup in menu #1927
Conversation
@@ -67,6 +71,7 @@ const ToolbarExampleShorthand = () => { | |||
// Adding tooltipAsLabelBehavior as the ToolbarItems contains only icon | |||
return ( | |||
<Tooltip | |||
key={`${rest.key}-tooltip`} // to avoid errors with keys |
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.
to avoid errors with keys
Codecov Report
@@ Coverage Diff @@
## master #1927 +/- ##
==========================================
- Coverage 70.42% 70.39% -0.03%
==========================================
Files 889 889
Lines 7841 7851 +10
Branches 2287 2288 +1
==========================================
+ Hits 5522 5527 +5
- Misses 2308 2313 +5
Partials 11 11
Continue to review full report at Codecov.
|
docs/src/examples/components/Toolbar/Usage/ToolbarExampleWithTooltip.shorthand.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/lib/accessibility/FocusZone/FocusTrapZone.tsx
Outdated
Show resolved
Hide resolved
const PopupContent = <Input icon="search" placeholder="Search..." /> | ||
|
||
const ToolbarExamplePopupInMenu = () => { | ||
const [menu1Open, setMenu1Open] = React.useState(false) |
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.
can you also add an example (not sure if this or a new file) that shows how they can close the popup after a successful action? for example, if the user selected the item that he wanted to select - in that case both the popup as well as the submenu should close. I want to understand how much state handling would the developer need to do.
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.
Yes, its available here: https://github.com/stardust-ui/react/pull/1927/files#diff-1e0d18e5b10bb6e298c5bdfa5516de67
…ub.com/stardust-ui/react into feat/toolbar-menu-popup
docs/src/examples/components/Toolbar/Usage/ToolbarExamplePopupInMenu.shorthand.tsx
Outdated
Show resolved
Hide resolved
It is broken again when you click on popup's background. Will be fixed in seperate PR: #1944 |
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.
nice work!
Implements #1894
Scenarios in E2E tests
TODO