-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(Rows): simplify component's logic, implement withChevron prop and allow right with controls #1122
Conversation
Accessibility report ℹ️ You can run this locally by executing |
Size stats
|
Deploy preview for mistica-web ready! ✅ Preview Built with commit b7f9435. |
Screenshot tests report ✔️ All passing |
@@ -127,6 +127,7 @@ interface BaseProps { | |||
bleedLeft?: boolean; | |||
bleedRight?: boolean; | |||
bleedY?: boolean; | |||
role?: string; |
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.
Unrelated. Added role prop to iconButton (other buttons have it)
const renderRight = (right: Right, centerY: boolean) => { | ||
if (typeof right === 'function') return right?.({centerY}); | ||
|
||
return centerY ? ( | ||
<div style={{display: 'flex', alignItems: 'center', height: '100%'}}>{right}</div> | ||
<div style={{display: 'flex', alignItems: 'center', height: '100%'}}> | ||
<div>{right}</div> |
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.
wrapping this inside a div, because of this case. We don't want to force display: flex
in the extra content by default. By wrapping right
inside an interior div, we avoid this (but we center the content).
If we try to use flexDirection: column
instead of wrapping the content with a div, it will affect other scenarios, like the same one from above but replacing divs with spans.
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 don't really like the idea to have the possibility of remove chevron icon with href, but..
I've added some tests covering scenario of right+controls. I've also added some tests related to withChevron prop, but this is not something introduced in this PR. This prop already existed, but it had no effect in the component |
that's nice! |
# [15.9.0](v15.8.0...v15.9.0) (2024-05-22) ### Features * **Rows:** simplify component's logic, implement withChevron prop and allow right with controls ([#1122](#1122)) ([eb987e4](eb987e4))
🎉 This PR is included in version 15.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issues:
To do list:
node_modules
inglobal-checkout-webview
repo. There were no breaking changes. There are several screenshot tests failing, but it's because that repo has an outdated version of Mística, and it doesn't contain latest changes related to rows. I've created two PRs that will fix the issues related to this: