Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

The changeset was outdated, describing an earlier iteration of the resizable API that used {persist: false} and {save: fn} as separate config objects. The implemented API uses a unified persist: false | 'localStorage' | fn syntax and adds controlled width support via resizable.width.

Changelog

Changed

  • Updated .changeset/pagelayout-resizable-persistence.md to document:
    • Unified persist property accepting false | 'localStorage' | PersistFunction
    • Controlled width mode via resizable.width property (separates current value from constraints)
    • Current type exports: PersistFunction, PersistConfig, SaveOptions, ResizableConfig, PaneWidth, PaneWidthValue
  • Replaced examples to demonstrate controlled width patterns:
    // Controlled width with custom persistence
    const [currentWidth, setCurrentWidth] = useState(defaultPaneWidth.medium)
    <PageLayout.Pane
      width="medium"
      resizable={{
        width: currentWidth,
        persist: (width) => setCurrentWidth(width)
      }}
    />

Removed

  • References to deprecated types (NoPersistConfig, CustomPersistConfig)
  • Numeric width prop support (removed from implementation)

Rollout strategy

  • Patch release
  • Minor release
  • Major release
  • None

Testing & Reviewing

Changes are documentation-only in the changeset file. Review that the documented API matches the implementation in commits 28e77e6 and 3115cac.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Storybook)
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge
  • Integration tests pass at github/github

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Jan 3, 2026

⚠️ No Changeset found

Latest commit: 05ab961

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Click here to learn what changesets are, and how to add one.

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

Co-authored-by: mattcosta7 <8616962+mattcosta7@users.noreply.github.com>
Copilot AI changed the title [WIP] Add custom persistence options to PageLayout.Pane Update changeset to reflect latest PageLayout.Pane resizable API Jan 3, 2026
Copilot AI requested a review from mattcosta7 January 3, 2026 22:05
@mattcosta7 mattcosta7 marked this pull request as ready for review January 3, 2026 22:31
@mattcosta7 mattcosta7 requested a review from a team as a code owner January 3, 2026 22:31
@mattcosta7 mattcosta7 requested a review from TylerJDev January 3, 2026 22:31
@mattcosta7 mattcosta7 merged commit 4cc1c58 into make-primer-react-pagelayout-accept-persister Jan 3, 2026
@mattcosta7 mattcosta7 deleted the copilot/sub-pr-7348 branch January 3, 2026 22: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.

2 participants