-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixed plan selector alignment and plan blocks size on tablet screen sizes #101994
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -404,7 +404,7 @@ const WrappedFeaturesGrid = ( props: FeaturesGridExternalProps ) => { | |
} | ||
|
||
// we want to fit 3 plans per row in this breakpoint | ||
const mediumBreakpoint = isInSiteDashboard ? 667 : 741; | ||
const mediumBreakpoint = 669; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason behind this change? If we want to customize this further, then we'll likely need a prop, otherwise it will break other pages, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We want to match the breakpoint with the max-width break-small defined here. Screen.Recording.2025-03-27.at.16.52.07.movWithout setting it, we'll have this weird behavior where a single plan is shown after the break-small: Screen.Recording.2025-03-27.at.16.53.31.mov
The original value was introduced here. I don't think we want to keep customizing it since it's hard-coded to this screen. @fushar can you confirm that?
I tested that feature locally (which has the flag I also tested other flows where we show the plans screen, like /plans, and the new change (669 instead 741) looks good as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks good on my end, too! Yeah, it would be good to have a single value here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool 👍🏻 |
||
|
||
return new Map< GridSize, number >( [ | ||
[ 'small', 0 ], | ||
|
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.
Why did we need this change? Specificity? Can we do it without? I don't like the idea of targeting
step-container-v2
directly.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.
Good question. The
.step-container-v2--plans
selector won't allow us to update the subtitle, so for that we need to start on a parent element. That's why I used the.step-container-v2
.We could implement it outside of the current CSS, something like this:
But it feels more organized to keep everything inside the same parent, since all these changes are specific for the new step container
.step-container-v2
.Interesting, can you elaborate more on why?
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 think @zaguiini concern is that by making the inner contents tightly coupled to the step container can lead to unintended style inheritance in other components of the step container and cause unintended side-effects.
I think having outside as it's own class is the safer approach.
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.
Well this is fine. It's going to be reworked anyway. Let's move forward.