-
Notifications
You must be signed in to change notification settings - Fork 55
Conversation
Codecov Report
@@ Coverage Diff @@
## master #947 +/- ##
==========================================
+ Coverage 80.51% 80.51% +<.01%
==========================================
Files 659 659
Lines 8448 8449 +1
Branches 1492 1429 -63
==========================================
+ Hits 6802 6803 +1
Misses 1631 1631
Partials 15 15
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #947 +/- ##
=====================================
Coverage 81% 81%
=====================================
Files 665 665
Lines 8528 8528
Branches 1443 1443
=====================================
Hits 6908 6908
Misses 1606 1606
Partials 14 14 Continue to review full report at Codecov.
|
nice work :) 👍 |
cb9afe0
to
d280f4e
Compare
} | ||
} | ||
|
||
handleMenuItemOverrides = accessibilityBehavior => |
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.
lets accept menuItemAccessibilityBehavior
as an argument of this method: this will decouple it from the parent accessibility object of menuButton
, as well as will make it easier to infer the intent at the place of usage:
Menu.create(menu, {
defaultProps: {
...accessibilityBehavior.attributes.menu,
overrideProps: {
items: this.handleMenuItemOverrides(accessibilityBehavior.menuItem),
...
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.
Reworked this part, now we're passing: (menuItemAccessibilityAttributes: AccessibilityAttributes) => {}
packages/react/src/index.ts
Outdated
getPreviousElement, | ||
focusAsync, | ||
} from './lib/accessibility/FocusZone/focusUtilities' | ||
export const focusZoneUtilities = { |
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.
actually, this is a breaking change :( My full support to introduce it, but either
- by changing changelog entry accordingly
- by means of dedicated PR
import { focusZoneUtilities, Menu } from '@stardust-ui/react' | ||
|
||
export const focusMenuItem = (menuRef: HTMLUListElement, order: 'first' | 'last') => { | ||
const selector = `.${Menu.Item.slotClassNames.wrapper}:${order}-child .${Menu.Item.className}` |
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, this is something that might strike a user, as .${Menu.Item.className}:${order}-child
is the most intuitive thing to try
…stardust-ui/react into feat/menu-button # Conflicts: # CHANGELOG.md # packages/react/src/index.ts
Fixes #877.