feat: message font zoom via text size dialog in conversation view#505
Merged
torlando-tech merged 4 commits intotorlando-tech:mainfrom Feb 21, 2026
Merged
Conversation
Contributor
Greptile SummaryAdded text size adjustment feature accessible via overflow menu in conversation view. Users can scale message text from 70% to 200% with a slider dialog that includes live preview and reset functionality. The font scale is persisted in DataStore and flows reactively through the ViewModel to the UI layer.
The implementation follows proper Jetpack Compose patterns with StateFlow lifecycle management and reactive UI updates. The slider has 13 steps (12 intermediate + 2 endpoints) covering the full range smoothly. Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User taps ⋮ menu] --> B[Opens overflow menu]
B --> C[User selects 'Text size']
C --> D[TextSizeDialog opens]
D --> E[User adjusts slider 0.7-2.0]
E --> F[Preview updates in real-time]
F --> G{User action?}
G -->|OK| H[viewModel.saveMessageFontScale]
G -->|Reset| I[Set scale to 1.0f]
H --> J[SettingsRepository.saveMessageFontScale]
I --> J
J --> K[DataStore persists scale value]
K --> L[messageFontScaleFlow emits new value]
L --> M[MessagingViewModel.messageFontScale updates]
M --> N[MessagingScreen observes via collectAsStateWithLifecycle]
N --> O[MessageBubble receives fontScale]
O --> P[LinkifiedMessageText applies scale]
P --> Q[Text fontSize = bodyLarge.fontSize × fontScale]
Last reviewed commit: 46ade88 |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
3411037 to
d72d9b9
Compare
Add a text size adjustment feature accessible from an overflow menu (⋮) in the conversation TopAppBar. - Add MESSAGE_FONT_SCALE preference to SettingsRepository (DataStore) - Expose messageFontScale StateFlow in MessagingViewModel - Add overflow menu with "Text size" option (FormatSize icon) - Create TextSizeDialog with slider (70%-200%), live preview, and reset - Pass fontScale through MessageBubble → LinkifiedMessageText - Scale message text fontSize (range 0.7x to 2.0x, persisted) - Add messageFontScale mocks to ViewModel and UI tests
- Cancel closes the dialog without saving (same as back/tap outside) - OK saves the current slider value and closes - Remove Reset button for cleaner UX
Toolbar now shows 4 icons (Call, Location, Star, More) instead of 5. Sync is accessible via the overflow menu as "Sync messages" with syncing state indicator (spinner + tinted overflow icon). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace suppress annotation with real assertions: verify menu item exists before click and menu dismisses after click. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d72d9b9 to
08e469f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a text size adjustment feature in the conversation view, accessible via an overflow menu (⋮) in the TopAppBar.
Changes
SettingsRepository
MESSAGE_FONT_SCALEpreference key (DataStore float)messageFontScaleFlow(Flow, default 1.0f)saveMessageFontScale()with range clamping (0.7f–2.0f)MessagingViewModel
messageFontScale: StateFlow<Float>from SettingsRepositorysaveMessageFontScale(scale)actionMessagingScreen
TextSizeDialogcomposable with:fontScalethroughMessageBubble→LinkifiedMessageTextbodyLarge.fontSizeby the font scale factorTests
messageFontScaleFlowmock toMessagingViewModelTest(main + failing setup)messageFontScaleFlowmock toMessagingViewModelImageLoadingTestmessageFontScalemock toMessagingScreenTest