Fix: Implement responsive font sizing for asset accounts on large screens
Problem
Asset account text was displaying at extremely small, barely readable font sizes on large screen devices like the iPhone 17 Pro Max. The issue was caused by hardcoded font sizes that didn't scale appropriately with screen size, resulting in poor user experience on modern large-screen devices.
Solution
Implemented comprehensive responsive font sizing using the existing screen size detection utilities (isLargeScreen() and isMediumScreen()) to dynamically scale all text elements and icons in the Asset Accounts section based on device screen size.
Changes Made
Font Size Scaling:
- Large Screens (iPhone 17 Pro Max): Account names and balances increased from 14px to 18px (+29% improvement)
- Medium Screens (iPhone 14 Pro): Moderate scaling to 16px for better readability
- Small Screens (iPhone SE): Maintains original 14px sizing (no regression)
Comprehensive Coverage:
- Account names and balance amounts
- Balance difference indicators
- Percentage change badges
- Section titles and footer text
- Sort icons
Technical Implementation
The solution leverages existing screen detection logic:
-
isLargeScreen(): Devices with height > 900px (iPhone 17 Pro Max, etc.) -
isMediumScreen(): Devices with 800px < height < 900px (iPhone 14 Pro, etc.) - Default: Original sizing for smaller devices
All font sizes are calculated dynamically:
const accountNameFontSize = isLarge ? 18 : isMedium ? 16 : 14;
const balanceFontSize = isLarge ? 18 : isMedium ? 16 : 14;
// ... and so on for all UI elements
Impact
- Improved Readability: 29-40% larger text on large screens makes account information easily readable
- Better UX: Consistent scaling across all UI elements provides professional, polished experience
- Backward Compatible: No changes to existing small screen behavior
- Minimal Code Changes: Surgical implementation with only 17 insertions, maintaining code quality
This fix ensures the abacus app provides an optimal user experience across all iOS device sizes, addressing the reported usability issue while maintaining existing functionality.
Original prompt
This section details on the original issue you should resolve
<issue_title>Bug: extra small font for asset accounts on home screen</issue_title> <issue_description>Describe the bug
victorbalssa/abacus#407 introduced some changes that now lead to asset accounts looking really compressed and small on devices with large screens.
Please have a look, the device is 17 Pro Max.
To Reproduce Steps to reproduce the behavior:
- Update the app to version v0.25.0
- Open the app
- You’ll see the compressed text
Expected behavior The text should render at a legible font size.
Screenshots
Smartphone (please complete the following information):
- Device: iPhone 17 Pro Maz
- OS: iOS 26.0.1
- Version: v0.25.0
Additional context NA </issue_description>
Comments on the Issue (you are @copilot in this section)
Fixes victorbalssa/abacus#413
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.