Skip to content

feat: Add optional width and zIndex props to SideSheet component#1277

Merged
andersler merged 1 commit into
mainfrom
feat/sidesheet-width-and-z-index
May 5, 2026
Merged

feat: Add optional width and zIndex props to SideSheet component#1277
andersler merged 1 commit into
mainfrom
feat/sidesheet-width-and-z-index

Conversation

@andersler
Copy link
Copy Markdown
Contributor

@andersler andersler commented Apr 29, 2026

Azure DevOps links

User story

Tasks


  • Needs to be tested locally by reviewer

Copilot AI review requested due to automatic review settings April 29, 2026 12:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 width prop to SideSheet base props and plumbed it through to styling for runtime width overrides.
  • Added zIndex prop for modal and floating side 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.

Comment thread src/organisms/SideSheet/SideSheet.styles.ts Outdated
Comment thread src/organisms/SideSheet/SideSheet.tsx
Comment thread src/organisms/SideSheet/SideSheet.tsx Outdated
Comment thread src/organisms/SideSheet/SideSheet.stories.tsx Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 17224 / 17224
🔵 Statements 100% (🎯 100%) 17224 / 17224
🔵 Functions 100% (🎯 100%) 1244 / 1244
🔵 Branches 100% (🎯 100%) 4385 / 4385
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/organisms/SideSheet/SideSheet.styles.ts 100% 100% 100% 100%
src/organisms/SideSheet/SideSheet.tsx 100% 100% 100% 100%
Generated in workflow #2273 for commit 8960baa by the Vitest Coverage Report Action

@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from ddd4d5c to 784a732 Compare April 29, 2026 13:17
Copilot AI review requested due to automatic review settings April 30, 2026 05:33
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 784a732 to 36d68c4 Compare April 30, 2026 05:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/organisms/SideSheet/SideSheet.tsx
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andersler andersler marked this pull request as ready for review April 30, 2026 06:02
@andersler andersler requested a review from a team as a code owner April 30, 2026 06:02
@andersler andersler requested a review from arkadiy93 April 30, 2026 06:02
@andersler andersler marked this pull request as draft April 30, 2026 06:04
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 36d68c4 to 35cd051 Compare April 30, 2026 10:11
@andersler andersler marked this pull request as ready for review April 30, 2026 10:12
Copilot AI review requested due to automatic review settings April 30, 2026 10:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 withScrim rendering path, ScrimWrapper wraps the entire SideSheetContent and has an onClick handler. Because clicks on descendants bubble, clicking anywhere inside the sheet (including interactive children) will also trigger onClose via 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.

Comment thread src/organisms/SideSheet/SideSheet.styles.ts Outdated
Comment thread src/organisms/SideSheet/SideSheet.types.ts Outdated
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 35cd051 to 7eaa2b6 Compare April 30, 2026 11:54
Copilot AI review requested due to automatic review settings April 30, 2026 11:58
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 7eaa2b6 to 1da22b2 Compare April 30, 2026 11:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/organisms/SideSheet/SideSheet.tsx Outdated
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 1da22b2 to 36e20a7 Compare May 4, 2026 07:12
Copilot AI review requested due to automatic review settings May 4, 2026 07:32
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from 36e20a7 to 8f2a373 Compare May 4, 2026 07:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/organisms/SideSheet/SideSheet.tsx
Comment thread src/organisms/SideSheet/SideSheet.stories.tsx
Comment thread src/organisms/SideSheet/SideSheet.jsdom.test.tsx Outdated
Comment thread src/organisms/SideSheet/SideSheet.stories.tsx Outdated
Comment thread src/organisms/SideSheet/SideSheet.tsx Outdated
Comment thread src/organisms/SideSheet/SideSheet.styles.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/organisms/SideSheet/SideSheet.tsx
Comment thread src/organisms/SideSheet/SideSheet.types.ts
Comment thread src/organisms/SideSheet/SideSheet.styles.ts
@andersler andersler force-pushed the feat/sidesheet-width-and-z-index branch from eaaea02 to 8960baa Compare May 5, 2026 08:25
Copy link
Copy Markdown
Contributor

@arkadiy93 arkadiy93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@andersler andersler merged commit 4399c60 into main May 5, 2026
10 of 11 checks passed
@andersler andersler deleted the feat/sidesheet-width-and-z-index branch May 5, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants