phcode-dev / phoenix

Phoenix is a modern open-source Code Editor for the web, built for the browser.
https://phcode.io
GNU Affero General Public License v3.0
1.78k stars 124 forks source link

fix: zoom editor fonts only and live preview switch issues #1799

Closed abose closed 3 months ago

abose commented 3 months ago

Restore Editor-Only Font Zoom Functionality

Context: In the initial version of Phoenix, the font zoom feature was limited to the editor, similar to the behavior observed in Brackets. However, when system-wide zoom capabilities were lacking, Phoenix expanded the font zoom to include menus and other UI elements as a temporary measure.

Issue: Although native system-wide zoom was later successfully integrated into the Tauri layer, the temporary extension of font zoom to all UI elements was never reverted. This led to unnecessary zooming of UI components that should not typically scale with the editor font settings.

Solution: This pull request aims to revert the font zoom functionality so that it exclusively applies to the editor's font. This change reinstates the original, more focused behavior and utilizes the native system-wide zoom capabilities for broader UI scaling needs.

Fixes: https://github.com/orgs/phcode-dev/discussions/1798

Also fix live preview switch issues

When a related js file is open in the editor, and clicking on a text box in the live preview focuses the active editor, never being able to type text in the text field. That breaks dev workflows.

phoenixide commented 3 months ago

Thank You for making this pull request.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud