authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:12:21-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:12:21-07:00
log5fe29c89456c151529a63ddcbf132b4c518f1838
tree5a11eab0f790268406083e213806935ca71a2fe3
parent044a6e168ad1eb213c2c7c277034e65c638cc937
signature Signed by PGP key B5690EEEBB952194

refactor(mobile): remove unused font size steppers (#9975)


2 files changed, 1 insertions(+), 16 deletions(-)

apps/mobile/src/lib/appearancePreferences.test.ts+1-6
......@@ -13,8 +13,6 @@ import {
1313 resolveMobileCodeSurface,
1414 resolveNativeMarkdownTypography,
1515 resolveTextScaleVariables,
16 stepBaseFontSize,
17 stepCodeFontSize,
1816 stepTerminalFontSize,
1917} from "./appearancePreferences";
2018
......@@ -73,11 +71,8 @@ describe("appearancePreferences", () => {
7371 expect(normalizeCodeFontSize(30)).toBe(18);
7472 });
7573
76 it("steps font sizes within bounds", () => {
74 it("steps terminal font size within bounds", () => {
7775 expect(stepTerminalFontSize(6, -1)).toBe(6);
78 expect(stepBaseFontSize(11, -1)).toBe(11);
79 expect(stepCodeFontSize(8, -1)).toBe(8);
80 expect(stepBaseFontSize(15, 1)).toBe(16);
8176 });
8277
8378 it("scales markdown typography from the base size", () => {
apps/mobile/src/lib/appearancePreferences.ts-10
......@@ -235,22 +235,12 @@ export function resolveNativeMarkdownTypography(baseFontSize: number): NativeMar
235235 };
236236}
237237
238export function stepBaseFontSize(current: number, direction: -1 | 1): number {
239 const next = direction === -1 ? current - BASE_FONT_SIZE_STEP : current + BASE_FONT_SIZE_STEP;
240 return normalizeBaseFontSize(next);
241}
242
243238export function stepTerminalFontSize(current: number, direction: -1 | 1): number {
244239 const next =
245240 direction === -1 ? current - TERMINAL_FONT_SIZE_STEP : current + TERMINAL_FONT_SIZE_STEP;
246241 return normalizeTerminalFontSize(next);
247242}
248243
249export function stepCodeFontSize(current: number, direction: -1 | 1): number {
250 const next = direction === -1 ? current - CODE_FONT_SIZE_STEP : current + CODE_FONT_SIZE_STEP;
251 return normalizeCodeFontSize(next);
252}
253
254244export {
255245 DEFAULT_TERMINAL_FONT_SIZE,
256246 MAX_TERMINAL_FONT_SIZE,