Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): app zoom no longer zooms the preview browser #6649

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/6649/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 119 additions and 15 deletions (loading 3).

x
0 of 4 viewed, 4 left
119 additions and 15 deletionsapps/desktop/src/preview/Manager.test.tsModified
View file
@@ -979,7 +979,10 @@
​
- effectIt.effect("mirrors Electron's effective zoom across registration and navigation", () =>
+ // The guest reports whatever zoom level Chromium handed it from the app
+ // window, so the tab's own zoom is the source of truth in both directions:
+ // asserted onto every guest, never read back off one.
+ effectIt.effect("keeps the tab's own zoom instead of the guest's reported zoom", () =>
withManager((manager) =>
Effect.gen(function* () {
let effectiveZoom = 0.9;
@@ -1025,18 +1028,13 @@
yield* manager.createTab("tab_zoom");
yield* manager.registerWebview("tab_zoom", 42);
- expect(states.at(-1)?.zoomFactor).toBe(0.9);
- expect(setZoomFactor).not.toHaveBeenCalled();
+ expect(states.at(-1)?.zoomFactor).toBe(1);
+ expect(setZoomFactor).toHaveBeenCalledWith(1);
- effectiveZoom = 1.25;
- listeners.get("did-navigate")?.();
- yield* Effect.yieldNow;
-​
- expect(states.at(-1)?.zoomFactor).toBe(1.25);
- expect(setZoomFactor).not.toHaveBeenCalled();
-​
- zoomReadable = false;