Remove code to round newSize on resize (#34543)

This never actually fixed the issue of the call elements being blurry
due to fractional pixels. But it also causes other issues like the
max/min width of the left panel never being persisted in settings.
This commit is contained in:
R Midhun Suresh
2026-08-05 10:13:38 +00:00
committed by GitHub
parent 06bedd0e5a
commit 01640bb8d6
2 changed files with 0 additions and 21 deletions
@@ -147,19 +147,4 @@ describe("LeftPanelResizerViewModel", () => {
vm.onLeftPanelResized(50);
expect(mockHandle.resize).not.toHaveBeenCalled();
});
it("should resize to nearest whole number", () => {
const vm = new ResizerViewModel(CallStore.instance);
const mockHandle = {
resize: vi.fn(),
getSize: vi.fn().mockReturnValue(0),
} as unknown as PanelImperativeHandle;
vm.setPanelHandle(mockHandle);
// Initial call is ignored
vm.onLeftPanelResized(70);
// This should be processed
vm.onLeftPanelResized(25.515);
expect(mockHandle.resize).toHaveBeenLastCalledWith("26%");
});
});
@@ -99,12 +99,6 @@ export class ResizerViewModel
this.autoCollapse.onLeftPanelResized();
// We don't want the panels to have fractional widths as that can cause blurry UI elements.
if (!Number.isInteger(newSize)) {
this.panelHandle?.resize(`${Math.round(newSize)}%`);
return;
}
const isCollapsed = newSize === 0;
// Store the size if the panel isn't collapsed.
if (!isCollapsed) {