Skip to content
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
merged 5 commits into from
Oct 22, 2024

Conversation

kepsteen
Copy link
Contributor

@kepsteen kepsteen commented Oct 14, 2024

Closes #601

  • Changed flex-direction of label on smallest screens to flex-col to stack team image and name vertically

Recording 2024-10-16 at 10 37 05

Copy link

appwrite bot commented Oct 14, 2024

Gridiron Survivor Application 6616ea581ef9f5521c7d

Function ID Status Action
Your function deployment has failed. Please check the logs for more details and retry.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
userAuth 6626fef885a9f630442b failed Failed View Logs

Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.

💡 Did you know?
Cursor pagination performs better than offset pagination when loading further pages

Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gridiron-survivor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 2:10pm
gridiron-survivor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 2:10pm

htmlFor={team}
data-testid="team-label"
disabled={isDisabled}
className="flex-col xs:flex-row"
Copy link
Member

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 it flex-col by default, and flex-rowat a large enough breakpoint?

Copy link
Contributor Author

@kepsteen kepsteen Oct 14, 2024

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.

Copy link
Member

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.

Copy link
Contributor Author

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 the sm breakpoint. When the screen sizes exceed the sm breakpoint the class flex-col would be applied and the team name and image would be placed on top of each other.

Copy link
Member

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.

Copy link
Collaborator

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 be flex-col. Then, you use sm:flex-row. Ending with classaName="flex-col sm:flex-row". Mobile first, and adjust larger screens accordingly.

Therefore, we do not need the custom 400 breakpoint.

Copy link
Member

@ryandotfurrer ryandotfurrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@shashilo
Copy link
Collaborator

@kepsteen For these responsive tickets, can y'all create short videos showing the changes in action? Thanks!

@kepsteen kepsteen merged commit 9269e2b into develop Oct 22, 2024
5 checks passed
@kepsteen kepsteen deleted the Cody/increase-WeeklyPickButton-responsiveness branch October 22, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI/UX: Increase WeeklyPickButton's Responsiveness
4 participants