Skip to content

Extract magic number to named constant with documentation#20

Merged
byemaxx merged 2 commits intostagingfrom
copilot/sub-pr-16-yet-again
Jan 7, 2026
Merged

Extract magic number to named constant with documentation#20
byemaxx merged 2 commits intostagingfrom
copilot/sub-pr-16-yet-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 7, 2026

Addresses code review feedback to replace the hardcoded 0.92 fill ratio threshold with a named constant.

Changes

  • Added MATRIX_FILL_RATIO_THRESHOLD constant at module level with documentation explaining the 92% threshold determines when to left-align matrix layout (sidebar visible) vs center it
  • Updated fill ratio comparison to use the constant instead of the magic number
// Before
const shouldAlignLeft = sidebarCollapsed
  ? (containerWidth > availableWidth)
  : ((containerWidth > availableWidth) || (fillRatio < 0.92));

// After
const MATRIX_FILL_RATIO_THRESHOLD = 0.92;
// ...
const shouldAlignLeft = sidebarCollapsed
  ? (containerWidth > availableWidth)
  : ((containerWidth > availableWidth) || (fillRatio < MATRIX_FILL_RATIO_THRESHOLD));

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: byemaxx <44231502+byemaxx@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix matrix layout and export cropping adjustments Extract magic number to named constant with documentation Jan 7, 2026
Copilot AI requested a review from byemaxx January 7, 2026 00:19
@byemaxx byemaxx marked this pull request as ready for review January 7, 2026 00:21
@byemaxx byemaxx merged commit 818ca38 into staging Jan 7, 2026
@byemaxx byemaxx deleted the copilot/sub-pr-16-yet-again branch January 7, 2026 00:21
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