Skip to content

feat: add pinch-to-zoom support to editor - #2963

Open
gahanad wants to merge 4 commits into
Acode-Foundation:mainfrom
gahanad:feat/editor-pinch-to-zoom
Open

gahanad wants to merge 4 commits into
Acode-Foundation:mainfrom
gahanad:feat/editor-pinch-to-zoom

Conversation

@gahanad

@gahanad gahanad commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds pinch-to-zoom support to the editor to make editing more convenient on mobile devices.

Users can adjust the editor's font size using a two-finger pinch gesture, improving readability and usability on smaller screens.

Changes Made

  • Added a pinch-to-zoom extension for the editor.
  • Dynamically adjusts the editor font size based on the pinch gesture.
  • Enforces minimum and maximum font-size limits.
  • Saves the updated font size setting when the gesture ends.
  • Cleans up touch event listeners when the extension is destroyed.
  • Added unit tests covering pinch-zoom behavior and font-size calculations.

Testing

  • Added unit tests for pinch-zoom functionality.
  • Verified the targeted unit tests pass.
  • Manually tested pinch-to-zoom on an Android device.
  • Verified the full test suite and CI checks.

Related Issue

Closes #2426

@github-actions github-actions Bot added the enhancement New feature or request label Oct 9, 2026
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the line-number preview issue is fixed and no new actionable defects were found.

Summary

Adds two-finger pinch-to-zoom to the main editor, with size limits and one settings update when the gesture ends.

  • The latest revision moves the preview to the editor root so code and line numbers zoom together.
  • It updates the gesture tests to check the root.
  • The numbered previous finding is fixed. No new actionable issues were found.

Reviews (4) · Last reviewed commit: "fix: address pinch-to-zoom review feedba..." · Reviewed by Greptile

Comment thread src/cm/pinchZoom.ts Outdated
Comment thread src/cm/pinchZoom.ts Outdated
Comment thread src/cm/pinchZoom.ts Outdated
Comment thread src/cm/pinchZoom.ts Outdated
@gahanad

gahanad commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

Comment thread src/cm/pinchZoom.ts Outdated
@gahanad

gahanad commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

Comment thread src/cm/pinchZoom.ts Outdated
@gahanad

gahanad commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Request featured "Zoom"

2 participants