Remove will-change: width and use actual element height in PageLayout drag optimizations#7374
Conversation
|
- Removed will-change: width from setDraggingStyles/removeDraggingStyles as it provides no benefit for layout properties - Updated containIntrinsicSize to use element.offsetHeight instead of hardcoded 500px to prevent layout shift - Updated test to verify will-change is no longer set during drag operations Co-authored-by: mattcosta7 <8616962+mattcosta7@users.noreply.github.com>
|
👋 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 |
ea61584
into
second-optimization-pass-for-page-layout
Removes ineffective
will-change: widthoptimization and fixes layout shift from hardcoded size estimation in PageLayout drag operations.Changes
paneUtils.ts:will-change: widthfrom drag styles—provides no benefit for layout properties, only increases memorycontainIntrinsicSizefrom hardcoded500pxto actualelement.offsetHeightto prevent layout shift withcontent-visibility: autoPageLayout.test.tsx:will-changeis no longer applied during drag operationsChangelog
Changed
PageLayout.Pane: Removedwill-change: widthduring resize/drag operationsPageLayout.Pane:containIntrinsicSizenow uses actual element height instead of hardcoded 500pxRollout strategy
Testing & Reviewing
Test resizable panes in PageLayout stories—drag behavior should be unchanged, but more efficient.
Merge checklist
Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.