-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix(Header, Cards, Hero): fix spacings logic #1298
Conversation
@@ -424,10 +424,12 @@ const CardContent = ({ | |||
</div> | |||
)} | |||
{headline && ( | |||
// assuming that the headline will always be followed by one of: pretitle, title, subtitle, description |
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.
All cards were assuming this before, except of AdvancedDataCard. In #1292, I've done the same for the AdvancedDataCard, and it broke one screenshot test in webapp (they use headline and extra prop to render everything else).
I've removed all these unnecesary assumptions from everywhere
Size stats
|
@@ -107,7 +109,7 @@ export const Header = ({ | |||
)} | |||
{headlineContent} | |||
{pretitleContent && ( | |||
<div style={{paddingBottom: pretitle || description ? 8 : 0, order: -1}}> | |||
<div style={{paddingBottom: title || description ? 8 : 0, order: -1}}> |
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.
This was a typo :(
Accessibility report ℹ️ You can run this locally by executing |
Deploy preview for mistica-web ready! ✅ Preview Built with commit 5906817. |
## [16.6.1](v16.6.0...v16.6.1) (2024-11-26) ### Bug Fixes * **Header, Cards, Hero:** fix spacings logic ([#1298](#1298)) ([327ac5f](327ac5f))
🎉 This PR is included in version 16.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
With these fixes, the only screenshot failing in webapp is this one:
But this is expected (and it was incorrect before). This is a DataCard with headline + extra. According to card specs, there is no space between pre-defined content and extra slot: