-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cody/increase weekly pick button responsiveness #611
Merged
kepsteen
merged 5 commits into
develop
from
Cody/increase-WeeklyPickButton-responsiveness
Oct 22, 2024
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
83271df
Made team image smaller on mobile screens
kepsteen 1e66c56
on smallest screens stacked Team logo and name vertically
kepsteen 465ee8a
Merge remote-tracking branch 'origin/develop' into Cody/increase-Week…
kepsteen 8f1d7f1
removed xs breakpoint
kepsteen 644dcf5
Merge branch 'develop' into Cody/increase-WeeklyPickButton-responsive…
kepsteen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
It's better in tailwind to work from small to large. Therefore it should be:
className="flex-row sm:flex-col"
However, I'm confused by the need for the addtional
xs
breakpoint. Why not just make itflex-col
by default, andflex-row
at a large enough breakpoint?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 am working from small to large. For screen sizes less than the xs breakpoint, the label will have the class
flex-col
to allow the team image and the team name to stack vertically.The reason I created an extra breakpoint was that I found the issue to only happen on screen sizes less than 400px. When I tried using the
sm
breakpoint provided by tailwind, it looked strange that they were stacked vertically as the Button grew in size on screens closer to the breakpoint.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.
Okay, so if you change it to
className="flex-row sm:flex-col"
does that still work? I try not to target specifically smaller breakpoints. Instead, start with the smallest and change it for the larger ones. If that makes sense.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 this would have the opposite effect that I was looking for. In this case the label would have the class
flex-row
placing the team name and image next to each other on screen sizes less than thesm
breakpoint. When the screen sizes exceed thesm
breakpoint the classflex-col
would be applied and the team name and image would be placed on top of each other.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.
Yes, you're right, sorry.
All I'm trying to get across is you should almost always make the default for the smallest breakpoint.
So
className="flex-col sm:flex-row"
or whichever larger breakpoint you find appropriate for the row.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.
From 0 to 640px
sm
breakpoint, is the minimum size. Even if this breaks at 400, it will adhere the same styles starting at 640px and lower. Anything from 0 to 640px should beflex-col
. Then, you usesm:flex-row
. Ending withclassaName="flex-col sm:flex-row"
. Mobile first, and adjust larger screens accordingly.Therefore, we do not need the custom 400 breakpoint.