Skip to content

feat(side-sheet): support default width - #3392

Merged
Noggling merged 3 commits into
mainfrom
feat/side-sheet-default-width
Sep 11, 2026
Merged

Noggling merged 3 commits into
mainfrom
feat/side-sheet-default-width

Conversation

@Noggling

@Noggling Noggling commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Component Development

Type

  • Feature
  • Fix
  • Hotfix (should release ASAP)
  • Maintenance (deps only)

Reference to assignment

Closes equinor/fusion-core-tasks#1871

Parent task: equinor/fusion-core-tasks#1847

Description of assignment

Allow consumers to choose the width at which a side sheet initially opens without changing the existing minimum-width behavior or requiring a controlled width API.

Description of Proposed Changes

  • Add an optional defaultWidth prop accepting pixel numbers or viewport percentages such as "50%".
  • Preserve existing behavior by falling back to minWidth, then 480px.
  • Keep resizing functional by storing the measured pixel width after a resize.
  • Add a Storybook control and example for testing the opening width.
  • Add a minor changeset for @equinor/fusion-react-side-sheet.

Checklist

Create User Story(DevOps) or Issue(Github)

  • Describe functional requirements
  • Design plan/suggestion (e.g. images, link to eds design or relevant figma links, mention of eds tokens to use)
  • Communication with UX (evaluate if needed)

Development

  • Describe the component
  • Code funtional requirements
  • Create stories
  • Create snapshots (evaluate if needed)
  • Remove unused imports and commented code
  • Lint code with Biome (blocked by the existing local Biome CLI/config schema mismatch)

Create Pull Request

  • Assign relevant reviewers in Github and Cromatic
  • Inform colleagues of pending reviews

Review of Pull Request

  • Follow up on comments from code review and implement necessary changes (evaluate if needed)
  • Review approved in github (and chromatic)

Publish Code

  • Add changeset
  • Merge PR
  • Consider letting fusion developers know this feature exists

Verification

  • npm run build --workspace=@equinor/fusion-react-side-sheet
  • bun run storybook:build
  • Browser-verified defaultWidth="50%" renders at 785px in a 1570px viewport.

@changeset-bot

changeset-bot Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4304193

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@equinor/fusion-react-side-sheet Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/side-sheet/src/components/SideSheetBase.tsx Fixed
Comment thread packages/side-sheet/src/components/SideSheetBase.tsx Outdated
Comment thread storybook/src/stories/sidesheet/side-sheet.stories.tsx
@Noggling
Noggling requested a review from eikeland September 4, 2026 09:03
@Noggling
Noggling merged commit d6cf6b0 into main Sep 11, 2026
5 of 7 checks passed
@Noggling
Noggling deleted the feat/side-sheet-default-width branch September 11, 2026 08:13
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