-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix
: Fix PostItem scaling
#382
Conversation
Bugfix
: Fix PostItem scaling issueBugfix
: Fix PostItem scaling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes and code lgtm. Thank you for tackling this! :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, works as expected!
Code lgtm
@eylulnc There is one merge conflict, once that one is fixed, feel free to add the "Ready to merge" label :) |
…into bugfix/communication/fix-post-scaling # Conflicts: # feature/metis/conversation/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/feature/metis/conversation/ui/post/PostItem.kt
Problem Description
When the user adjusts the system font size (for accessibility or personal preference), certain text elements—especially those rendered via our custom MarkdownText composable—do not scale properly. This leads to inconsistent UI: standard Compose Text elements scale up/down, but the markdown text remains the same size.
Changes
Fixed Markdown Text Scaling
Replaced TypedValue.COMPLEX_UNIT_DIP with TypedValue.COMPLEX_UNIT_SP in our MarkdownText composable.
Ensured that any text size set on the underlying TextView is in scale‐independent pixels (sp), so it respects the user’s font‐size setting.
Removed Fixed DP Constraints
Updated components (like HeadlineProfilePicture) that had hard‐coded dp sizes, allowing them to scale if desired or remain flexible in layout.
Steps for testing
Go to the device’s Settings → Display → Font size and select “Largest.” ( Also among other font settings)
Return to App and open a communication channel
Check in the channel Post Header is no longer clipped and the post content size is also updated according to the font size you arranged.
Check that the profile picture also resizes to align with the new header height.
Screenshots
Regular and Largest font size