feat(ECX-579): add Drawer component and wide Constrain variant - #7220
Merged
Conversation
Adds a persistent, non-modal drawer primitive that pushes adjacent layout over instead of overlaying it, for the ECX-579 larger-PLP-image A/B test's collapsible filter panel.
Adds an optional size prop ('medium' | 'wide', default 'medium') so
consumers can opt into a wider, uncapped layout width without changing
the default behavior for existing usages. Needed for ECX-579's larger
PLP product images.
…plugin ignore-not-found-export-webpack-plugin deep-imports webpack/lib/ModuleDependencyWarning, which moved under lib/errors/ in newer webpack 5 releases, breaking `npm run storybook` entirely. Replaces it with a small local plugin that achieves the same warning filtering via warning.constructor.name, with no dependency on webpack's internal file layout.
There was a problem hiding this comment.
Pull request overview
Adds new UI primitives to support ECX-579’s larger-PLP-image experiment and unblocks local Storybook by replacing an unmaintained webpack warnings plugin.
Changes:
- Introduces a new
Drawercomponent (non-modal, layout-pushing panel) with styles, tests, and a Storybook story. - Extends
Constrainwith an additivesize?: 'medium' | 'wide'prop and corresponding styling. - Replaces
ignore-not-found-export-webpack-pluginwith a local Storybook webpack plugin to filter “export was not found” warnings.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/index.ts | Re-exports Drawer from the components barrel. |
| src/components/Drawer/index.ts | Adds Drawer module barrel export. |
| src/components/Drawer/Drawer.tsx | Implements the Drawer component markup and class toggling. |
| src/components/Drawer/Drawer.test.tsx | Adds unit tests for child rendering and open/closed class behavior. |
| src/components/Drawer/Drawer.stories.tsx | Adds a Storybook example demonstrating layout push behavior. |
| src/components/Drawer/Drawer.scss | Adds width/transition-based drawer styling. |
| src/components/Constrain/Constrain.tsx | Adds size prop and wide variant class toggle. |
| src/components/Constrain/Constrain.scss | Adds Constrain--wide styling. |
| package.json | Removes the unmaintained Storybook webpack warning plugin dependency. |
| package-lock.json | Removes the same dependency from the lockfile. |
| .storybook/main.js | Switches Storybook config to use the new local warnings plugin. |
| .storybook/ignoreNotFoundExportWarningsPlugin.js | Implements local plugin to filter “export was not found” warnings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Hide the drawer's contents from focus and assistive tech while closed (visibility: hidden, delayed on close so the width transition still animates visibly, immediate on open). - Assert on a stable data-testid instead of DOM traversal in the test.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/components/Constrain/Constrain.tsx:18
- The new
sizeprop changes the rendered CSS class (Constrain--wide), but the existing Constrain test only checks that children render. Since this file already has a test suite, it would be good to add a unit test asserting (a) defaultsizedoes not addConstrain--wideand (b)size="wide"does add it, to prevent regressions in the new API.
<div
className={classNames('Constrain', { 'Constrain--wide': size === 'wide' }, className)}
{...rest}
>
moda-automation-devops
pushed a commit
that referenced
this pull request
Aug 17, 2026
# [21.14.0](21.13.0...21.14.0) (2026-08-17) ### Features * **ECX-579:** add Drawer component and wide Constrain variant ([#7220](#7220)) ([7fae603](7fae603))
Contributor
|
🎉 This PR is included in version 21.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Ref ECX-579.
Adds two small, additive primitives needed for ECX-579's larger-PLP-image A/B test in discovery:
Drawer: a persistent, non-modal panel that pushes adjacent layout over when open (no backdrop/portal/focus-trap), for the collapsible desktop filter panel.Constrain: new optionalsize?: 'medium' | 'wide'prop (default'medium', fully backward-compatible) for the wider PLP layout.Also includes an unrelated fix:
npm run storybookwas broken for everyone (ignore-not-found-export-webpack-plugindeep-imports a webpack internal path that moved in newer webpack 5 releases) — replaced it with a small local plugin with equivalent behavior.