Repository navigation
feat(menu-dropdown): add LWC button-menu variants and xx-small icon size - #3235
Merged
Merged
Conversation
Contributor
|
@Niznikr Please resolve conflicts. |
Contributor
Formatting-only changes to files touched by the upcoming menu-dropdown LWC parity change, split out so the functional diff stays reviewable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l icon size Match lightning-button-menu's trigger options. - `iconVariant` accepts `bare-inverse` and `border-inverse`. MenuDropdown converts them to `bare`/`border` plus `inverse` before passing them to the trigger, so they render the same as `buttonInverse` does today. - `iconSize` accepts `xx-small`, passed through to Button, which applies `slds-button_icon-xx-small` when an `iconVariant` is set. Adds jsdom tests for the trigger classes and InverseIconVariants and IconSizes stories. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Niznikr
force-pushed
the
feat/menu-dropdown-lwc-variants
branch
from
October 27, 2026 15:20
dbf81de to
44708a8
Compare
interactivellama
approved these changes
Oct 29, 2026
interactivellama
pushed a commit
that referenced
this pull request
Oct 29, 2026
…, and alignments (#3235) * style(menu-dropdown): apply prettier formatting Formatting-only changes to files touched by the upcoming menu-dropdown LWC parity change, split out so the functional diff stays reviewable. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(menu-dropdown): add LWC button-menu inverse variants and xx-small icon size Match lightning-button-menu's trigger options. - `iconVariant` accepts `bare-inverse` and `border-inverse`. MenuDropdown converts them to `bare`/`border` plus `inverse` before passing them to the trigger, so they render the same as `buttonInverse` does today. - `iconSize` accepts `xx-small`, passed through to Button, which applies `slds-button_icon-xx-small` when an `iconVariant` is set. Adds jsdom tests for the trigger classes and InverseIconVariants and IconSizes stories. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Additional description
Adds the
lightning-button-menutrigger variants, icon size, and menu alignments that MenuDropdown was missing. The class logic was checked against the LWCbuttonMenusource inlightning-base-components.iconVariantbare-inverse,border-inversebare/borderwithbuttonInverse. MenuDropdown converts them before passing them to the trigger, soButtonis unchanged and custom triggers receivebare/border+inverse.iconSizexx-smallslds-button_icon-xx-smallon the button. SLDS has no xx-small class for the icon itself, so the size only applies when aniconVariantis set (LWC also only sizes the button).ButtonIconSizeincomponents/buttongainsxx-small.alignbottom-left,bottom-center,bottom-rightslds-dropdown_bottom/_left/_rightclasses as LWC.alignautohasStaticAlignmentis set.Judgment call on
auto: DSR menus already flip by default (unlike LWC, where onlyautorepositions), so without thisautowould be the same asleft. Making it ignorehasStaticAlignmentis the closest match to LWC.menuPosition="relative"menus are positioned by CSS alone and never flip; the JSDoc notes this.Not a breaking change: every addition widens an existing union type, and existing values render the same markup. No existing story snapshot changed.
Commits:
style(menu-dropdown)is formatting only (the pre-commit hook formats whole files, and these weren't formatted on master). Thefeatcommit has the functional diff.Tests and stories
dropdown.test.jsx): trigger classes for the inverse variants and xx-small, and menu position classes for eachalignvalue.dropdown.browser.test.jsx, new): uses the real SLDS stylesheet in absolute and relative mode to check that each alignment opens above or below the trigger and lines up with the correct edge. Also checks thatautoflips withhasStaticAlignmentwhen there's no room below, andleftdoesn't.Alignments,InverseIconVariants,IconSizes, plus Storybook controls foralign,iconVariant, andiconSize.Existing behavior noticed but not changed: when a menu flips upward, it overlaps the trigger by 2px because
.slds-dropdown's top margin still applies.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request.
Green gate — all of these must pass locally (CI runs the same):
npm run lintpasses with 0 errors (npm run lint:fixto auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.npm run typecheckis clean (tsc --noEmit).npm test -- --runpasses — this runs both Vitest projects (jsdomunit+ real-browserbrowser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots withnpm test -- --run -uand review the diff.npm run buildsucceeds (type-check + Vite library build +.d.ts+ entry shims).Behavior & docs:
components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a*.browser.test.jsxfile (thebrowserproject); everything else is jsdom.npm run storybook→ http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server).onRenderContent/onRenderVisualPicker,iconprops,events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check againstcomponents/<name>/__examples__..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition.REVIEWER checklist (do not remove)
CIworkflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).@salesforce/design-system-react/components/<name>and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change →feat!:/BREAKING CHANGE:and a major version bump.🤖 Generated with Claude Code