-
Notifications
You must be signed in to change notification settings - Fork 132
[Dynamic Dashboard] Fix date header layout to work better with large fonts #11552
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
Conversation
Generated by 🚫 Danger |
.weight(1f) | ||
.wrapContentSize(align = Alignment.CenterStart) |
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.
weight
will make sure this layout will have a lower priority than the IconButton
below, and the wrapContentSize
modifier will make sure the view's content won't fill the space when it's larger than the content.
@@ -72,7 +75,8 @@ fun DashboardStatsHeader( | |||
MaterialTheme.colors.primary | |||
} else { | |||
MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.medium) | |||
} | |||
}, | |||
modifier = Modifier.weight(1f, fill = false) |
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.
I added this to make sure the Pencil icon is always visible.
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/18.7 #11552 +/- ##
==================================================
- Coverage 40.48% 40.48% -0.01%
Complexity 5197 5197
==================================================
Files 1083 1083
Lines 62937 62939 +2
Branches 8629 8629
==================================================
Hits 25481 25481
- Misses 35162 35164 +2
Partials 2294 2294 ☔ View full report in Codecov by Sentry. |
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.
Works as expected, nice job!
Closes: #11551
Description
This PR just fixes the layout of the date header we use in the dynamic dashboard to work better with large fonts.
Testing instructions
Images/gif
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.