Stop notification cards from shrinking their text#6088
Closed
j0ntz wants to merge 3 commits into
Closed
Conversation
Add explicit React.FC return types and use the shared themed CloseIcon instead of importing react-native-vector-icons directly.
Give the alert drop-down's close button a testID so UI tests can dismiss it instead of tapping coordinates. Committing the file graduates it off the lint suppression list, so AlertDropdown also picks up its explicit React.FC type.
The notification center relied on EdgeText's default adjustsFontSizeToFit, so a card with a long message rendered its title and body at a smaller size than its neighbors. Disable font scaling on the card text so every card renders at the same size and overflowing text truncates with an ellipsis.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
6 tasks
Contributor
Author
|
Superseded by #6105, which consolidates this and 11 other small GUI task branches into one PR/branch per the umbrella task's instructions. |
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.


Description
Asana task
Notification Center cards (side menu → Notifications) shrank their own text.
EdgeTextdefaults toadjustsFontSizeToFit={true}, and the card passednumberOfLines={3}withminimumFontScale={0.8}on the message and the 0.65 default on the title, so any notification whose message did not fit rendered smaller than its neighbours. Because the title and message share a height-constrained content container, the shrink cascaded to the title too, which is why one card in the reported screenshot is visibly smaller top to bottom.The card now passes
disableFontScalingon the title, timestamp and message, so every card renders at the same size and a message longer than three lines truncates with an ellipsis instead. This matches the requested behaviour: uniform cards, three lines, then "…". The home-screen banner (NotificationCard) already does the same thing on Android and is unchanged here.Also included:
NotificationCenterCard(explicitReact.FCtypes, shared themedCloseIconinstead of importingreact-native-vector-iconsdirectly), since committing the file graduates it off the lint suppression list.testIDon the alert drop-down's close button so UI tests can dismiss it by selector rather than by coordinate.Asana: https://app.asana.com/1/9976422036640/project/1200382638405084/task/1213213636561471
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Low Risk
Presentation-only notification UI and test/lint hygiene; no auth, payments, or data flow changes.
Overview
Notification center cards no longer shrink title, time, or message text to fit. The card passes
disableFontScalingon thoseEdgeTextfields and dropsminimumFontScaleon the message, so long copy truncates atnumberOfLines(2 for title, 3 for message) with an ellipsis while every card stays the same height.Lint / small extras:
NotificationCenterCardis brought in line with project rules (explicitReact.FC, themedCloseIconinstead of direct vector-icons) so it can come off the ESLint suppression list.AlertDropdowngets the sameReact.FCtyping andtestID="alertDropdownClose"on the dismiss control for UI tests. CHANGELOG documents the notification card fix.Reviewed by Cursor Bugbot for commit eb2c1d8. Bugbot is set up for automated code reviews on this repo. Configure here.