Skip to content

implement size prop for Drawer#556

Merged
stdavis merged 4 commits intomainfrom
feat/sidebar-size-config
Nov 13, 2025
Merged

implement size prop for Drawer#556
stdavis merged 4 commits intomainfrom
feat/sidebar-size-config

Conversation

@stdavis
Copy link
Copy Markdown
Member

@stdavis stdavis commented Nov 12, 2025

My use case is I want more room in the side bar for raster. Passing the size class directly to the component got complicated with the varients so I went with a set of predefined sizes.

Copilot AI review requested due to automatic review settings November 12, 2025 18:44
@stdavis stdavis enabled auto-merge (rebase) November 12, 2025 18:44
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 implements a size prop for the Drawer component, allowing consumers to specify predefined sizes (small, medium, large, extraLarge) for both sidebar and tray drawer types. The changes refactor the size handling to separate user-controllable sizes from the fullscreen state, which is now managed independently via a boolean flag.

Key Changes:

  • Added a size prop with four predefined size options: 'small', 'medium', 'large', and 'extraLarge'
  • Refactored fullscreen functionality to use isFullscreen state instead of mixing it with size values
  • Updated default size from 'normal' to 'medium', with specific width/height values for each size option

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/utah-design-system/src/components/Drawer.tsx Implements size prop with compound variants for sidebar widths and tray heights; refactors fullscreen state management
packages/utah-design-system/src/components/Drawer.stories.tsx Adds Storybook examples demonstrating the new size prop with 'extraLarge' and 'large' options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 12, 2025

Visit the preview URL for this PR (updated for commit 53604f3):
Firebase Preview: https://ut-dts-agrc-kitchen-sink-dev--feat-sidebar-size-config-ubmzo6p4.web.app
(expires "2025-11-27T17:29:34.860347531Z" )

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 3 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.

@stdavis stdavis requested a review from steveoh November 12, 2025 20:39
steveoh
steveoh previously approved these changes Nov 12, 2025
Copy link
Copy Markdown
Contributor

@steveoh steveoh left a comment

Choose a reason for hiding this comment

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

nice idea. Was screen size a consideration for when to show what size?

@stdavis
Copy link
Copy Markdown
Member Author

stdavis commented Nov 13, 2025

Was screen size a consideration for when to show what size?

If you are referring to raster, no, I'm not dynamically determining the size based on the screen size.

@steveoh
Copy link
Copy Markdown
Contributor

steveoh commented Nov 13, 2025

No I'm not referring to raster but sizing in general.

@stdavis
Copy link
Copy Markdown
Member Author

stdavis commented Nov 13, 2025

sizing in general

I just tried to come up with some consistent ranges.

@stdavis stdavis merged commit 75ab556 into main Nov 13, 2025
7 checks passed
@stdavis stdavis deleted the feat/sidebar-size-config branch November 13, 2025 17:31
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.

3 participants