Skip to content

Conversation

@mattcosta7
Copy link
Contributor

@mattcosta7 mattcosta7 commented Dec 12, 2025

This pull request refactors the pane width logic in the PageLayout component by extracting width-related calculations and state management into a new usePaneWidth hook. This improves code organization, maintainability, and performance, while also enhancing accessibility features and test coverage for drag and resize interactions.

Refactor and code organization:

  • Extracted pane width logic (including width calculation, constraints, persistence, and ARIA updates) from PageLayout.tsx into a new usePaneWidth hook, simplifying the main component and centralizing related functionality. [1] [2] [3] [4] [5] [6] [7] [8]

Testing improvements:

  • Added tests to verify that the data-dragging attribute is correctly set on the content area during both pointer and keyboard resizing, ensuring accessibility and UI feedback during interactions.

CSS and responsive design enhancements:

  • Exported CSS custom properties (such as paneMaxWidthDiffBreakpoint and paneMaxWidthDiffDefault) for use in JavaScript, improving synchronization between CSS breakpoints and JS logic.
  • Added comments and exported values in PageLayout.module.css to clarify the relationship between CSS variables and their usage in the new hook and component logic. [1] [2]

@mattcosta7 mattcosta7 self-assigned this Dec 12, 2025
@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

⚠️ No Changeset found

Latest commit: d4e9284

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 12, 2025
@github-actions
Copy link
Contributor

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

@github-actions github-actions bot requested a deployment to storybook-preview-7308 December 12, 2025 13:55 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7308 December 12, 2025 14:04 Inactive
@mattcosta7 mattcosta7 marked this pull request as ready for review December 12, 2025 14:23
@mattcosta7 mattcosta7 requested a review from a team as a code owner December 12, 2025 14:23
@mattcosta7 mattcosta7 requested a review from pksjce December 12, 2025 14:23
@mattcosta7 mattcosta7 merged commit 8c5edd0 into fix-resize-obsever-subscripotion Dec 12, 2025
45 of 46 checks passed
@mattcosta7 mattcosta7 deleted the refacotr-pane-width-logic branch December 12, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants