feat: Add optional width and zIndex props to SideSheet component#1277
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the SideSheet organism API to support optional width overrides and configurable zIndex (for modal/floating variants), updating the component implementation, styling, and Storybook coverage accordingly.
Changes:
- Added
widthprop toSideSheetbase props and plumbed it through to styling for runtime width overrides. - Added
zIndexprop formodalandfloatingside sheets and applied it in styles. - Added Storybook stories to validate custom width and z-index behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/organisms/SideSheet/SideSheet.types.ts | Extends SideSheet prop types with width and zIndex. |
| src/organisms/SideSheet/SideSheet.tsx | Passes width/zIndex through to content and wrapper logic. |
| src/organisms/SideSheet/SideSheet.styles.ts | Implements width override and conditional z-index styling. |
| src/organisms/SideSheet/SideSheet.stories.tsx | Adds play-test stories for width and zIndex. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
ddd4d5c to
784a732
Compare
784a732 to
36d68c4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
36d68c4 to
35cd051
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/organisms/SideSheet/SideSheet.tsx:59
- In the
withScrimrendering path,ScrimWrapperwraps the entireSideSheetContentand has anonClickhandler. Because clicks on descendants bubble, clicking anywhere inside the sheet (including interactive children) will also triggeronClosevia the scrim wrapper. Consider stopping propagation on the sheet container (e.g.,Wrapper/Sheet) or restructuring so the backdrop click target is a sibling element rather than a parent, so only true backdrop clicks close the sheet.
<ScrimWrapper
data-testid="side-sheet-scrim"
onClick={open ? onClose : undefined}
$zIndex={'zIndex' in rest ? rest.zIndex : undefined}
initial={{
display: 'none',
background: 'rgba(111,111,111,0)',
}}
animate={{
background: open ? 'rgba(111,111,111,0.35)' : 'rgba(111,111,111,0)',
display: open ? 'block' : 'none',
}}
>
<SideSheetContent
open={open}
onClose={onClose}
title={title}
type="modal"
headerElements={headerElements}
width={width}
zIndex={'zIndex' in rest ? rest.zIndex : undefined}
withScrim
>
{children}
</SideSheetContent>
</ScrimWrapper>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
35cd051 to
7eaa2b6
Compare
7eaa2b6 to
1da22b2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1da22b2 to
36e20a7
Compare
36e20a7 to
8f2a373
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9636cb2 to
eaaea02
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eaaea02 to
8960baa
Compare
Azure DevOps links
User story
Tasks