Skip to content

Avoid zoom level hard-coding#130

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Jun 8, 2026
Merged

Avoid zoom level hard-coding#130
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors Quick Look preview zoom handling to avoid hard-coded zoom constants by centralizing the default zoom in a CSS custom property and reusing it in related layout calculations.

Changes:

  • Introduces --quicklook-default-zoom and uses it for zoom and toolbar-clearance margin-top math in styles/quicklook.css.
  • Updates the compact-layout zoom override to set the default zoom variable instead of re-declaring zoom.
  • Updates pinch-zoom tracking to write --quicklook-zoom from the element’s zoom value (and updates the committed dist bundle accordingly).

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

File Description
styles/quicklook.css Centralizes default zoom into --quicklook-default-zoom and removes duplicated hard-coded constants.
src/quicklook/interaction.ts Updates how --quicklook-zoom is written during gesture events (needs a guard to preserve CSS fallback behavior).
dist/markedit-preview.js Regenerated bundle reflecting the zoom default refactor and gesture handling change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/quicklook/interaction.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated 1 comment.

Comment thread src/quicklook/interaction.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated no new comments.

@cyanzhong cyanzhong merged commit fb04f14 into main Jun 8, 2026
2 checks passed
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