Skip to content

Commit

Permalink
Menu descendants (#2358)
Browse files Browse the repository at this point in the history
* create Menu.styles

* installs descendants in menu

* extract useMenuHeight

* init descendants

* pass onItemFocus from provider

* abstract out useUpdatedChildren

* creates useHighlightReducer

* cleanup reducer

* skip disabled elements

* implement descendant in submenu

* Update yarn.lock

* rm focus-visible styles

we always want focus

* fix menu item list style

* Update Avatar props (#2352)

* avatar accepts null text

* update generated stories

* changeset

* Update spotty-ghosts-play.md

* fix ts errors

* rm deprecated hooks

* rm debug text

* restructure test suite

* Create blue-crews-hope.md

* Updates stories

* adds controlled story

* modernizes spec file

* Update Menu.stories.tsx

* Update SplitButton.spec.tsx

* update split button pkg.json

* Update yarn.lock

* Delete getNewIndex.ts

* add // prettier-ignore

* mv HighlightReducer

Update getUpdatedIndex.ts

* Update .gitignore

* add turbo to clean (#2361)

* pr

* Update .gitignore

* create Menu.styles

* installs descendants in menu

* extract useMenuHeight

* init descendants

* pass onItemFocus from provider

* abstract out useUpdatedChildren

* creates useHighlightReducer

* cleanup reducer

* skip disabled elements

* implement descendant in submenu

* Update yarn.lock

* rm focus-visible styles

we always want focus

* fix menu item list style

* fix ts errors

* rm deprecated hooks

* rm debug text

* restructure test suite

* Create blue-crews-hope.md

* Updates stories

* adds controlled story

* modernizes spec file

* Update Menu.stories.tsx

* rm old highlight reducer

* rm unused descendant vars

* typo

---------

Co-authored-by: Shaneeza <[email protected]>
  • Loading branch information
TheSonOfThomp and shaneeza committed Jun 25, 2024
1 parent ef4b0ea commit f599c9e
Show file tree
Hide file tree
Showing 25 changed files with 850 additions and 699 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-crews-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/menu': minor
---

Internal refactor of Menu to leverage `@leafygreen-ui/descendants`. This improvement will enable faster feature development and bug fixes in the future (coming soon!)
5 changes: 5 additions & 0 deletions .changeset/spotty-dogs-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/split-button': patch
---

Updates Menu. Resolves failing tests due to Menu update
4 changes: 3 additions & 1 deletion packages/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"access": "public"
},
"dependencies": {
"@leafygreen-ui/descendants": "^0.1.1",
"@leafygreen-ui/emotion": "^4.0.8",
"@leafygreen-ui/hooks": "^8.1.3",
"@leafygreen-ui/icon": "^12.5.4",
Expand All @@ -48,6 +49,7 @@
},
"devDependencies": {
"@leafygreen-ui/button": "^21.2.0",
"@lg-tools/storybook-utils": "^0.1.1"
"@lg-tools/storybook-utils": "^0.1.1",
"@storybook/react": "^7.6.17"
}
}
Loading

0 comments on commit f599c9e

Please sign in to comment.