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 authored Jun 5, 2024
1 parent ba05ab6 commit 589a962
Show file tree
Hide file tree
Showing 27 changed files with 856 additions and 727 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
6 changes: 4 additions & 2 deletions packages/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"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.0.1",
"@leafygreen-ui/icon-button": "^15.0.21",
"@leafygreen-ui/lib": "^13.3.0",
"@leafygreen-ui/palette": "^4.0.9",
"@leafygreen-ui/popover": "^11.3.1",
"@leafygreen-ui/polymorphic": "^1.3.7",
"@leafygreen-ui/popover": "^11.3.1",
"@leafygreen-ui/tokens": "^2.5.3",
"lodash": "^4.17.21",
"react-transition-group": "^4.4.5"
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 589a962

Please sign in to comment.