Skip to content

fix(components): use a touch slider for conversation font size - #723

Merged
Leeeon233 merged 1 commit into
mainfrom
fix/conversation-font-size-slider
Sep 15, 2026
Merged

Leeeon233 merged 1 commit into
mainfrom
fix/conversation-font-size-slider

Conversation

@lodystage

@lodystage lodystage Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Risk: 🟢 low | Confidence: high — isolated appearance control; covered by component tests and browser touch/keyboard checks.

Problem / pressure

Adjusting conversation text size on a phone should be a direct touch interaction. The existing size picker requires opening a menu for each adjustment.

Summary

  • Replace desktop and mobile size pickers with one native slider, a pixel readout, and a 44px touch area. Mobile gives the control its own row.
  • Retain the eight sizes and persistence normalization introduced in fix(components): pick the conversation font size from a fixed scale #718, and update the existing sample text as the slider moves.
  • Cover boundaries, persistence after remount, live sample rendering, and light/dark visual states. Remove the unused picker-option helper.

Visual explanation

Mobile / desktop appearance
  → native range index (0–7)
  → CONVERSATION_FONT_SIZES[index] (pixels)
  → existing setting state → saved preference + readout + sample text

Phone screenshots were shared in the task conversation.

Before / after

Before After
Open a size menu, then select an option Drag directly through the same eight sizes
Desktop hover temporarily previews a menu option Dragging immediately saves the size and updates the sample

Test plan

  • Appearance and font-setting suites: 11 tests passed.
  • Browser checks: touch drag, live readout, persisted reload, keyboard bounds/steps, 320px and 393px layouts, and desktop pointer drag passed.
  • Storybook screenshots inspected in light/dark mode; not a packaged native-app test.
  • Full OSS check: typechecks and lint passed; components passed 477 files / 3671 tests. CLI had one macOS /var versus /private/var path assertion failure; its 11-test suite passed with TMPDIR=/private/tmp. All other CLI tests passed. The interrupted remainder was run separately: Electron (112 tests), i18n, import/platform/public-boundary guards all passed.
  • Formatting and documentation checks passed. The private affected-check wrapper is unavailable in this public checkout (missing scripts/format-check-changed.mjs), so the public repository's full check was used.

Context handoff

Instructions for reviewing agents

  • Review focus: Slider indices must map to CONVERSATION_FONT_SIZES; storage and sample rendering must receive pixel values.
  • Decisions to challenge: Immediate persistence while dragging, full-width mobile layout, and native range accessibility.
  • Plausible failures / evidence gaps: Native touch layout was previewed, but no new iOS binary was packaged.

@lodystage lodystage Bot added the risk:low label Sep 15, 2026
@Leeeon233
Leeeon233 merged commit 6093c34 into main Sep 15, 2026
6 of 9 checks passed
@Leeeon233
Leeeon233 deleted the fix/conversation-font-size-slider branch September 15, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant