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

feat(web): use tailwinds font size #6855

Merged
merged 20 commits into from
Jul 8, 2024

Conversation

silkeholmebonnen
Copy link
Contributor

@silkeholmebonnen silkeholmebonnen commented Jun 17, 2024

Issue

AVO-298

Description

The goal of this PR is to use tailwinds font size instead of defining our own. This PR also adds styling for h1, h2, h3 and p, and changes the app sizes in the app to reflect the design.

Preview

Double check

  • I have tested my parser changes locally with poetry run test_parser "zone_key"
  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

@silkeholmebonnen silkeholmebonnen marked this pull request as ready for review June 17, 2024 13:52
@VIKTORVAV99 VIKTORVAV99 self-requested a review June 17, 2024 13:52
@silkeholmebonnen
Copy link
Contributor Author

This PR is a work in progress for me and @Alportan to collaborate.

@madsnedergaard
Copy link
Member

Ah wait, now I get why it wasn't a draft - sorry!

@madsnedergaard madsnedergaard marked this pull request as ready for review June 17, 2024 14:23
@Alportan
Copy link
Contributor

Looks good SIlke! I think it definitely solves quite some accessibility issues with the very small font sizes we have today 🎉

I added a few points in Figma on some screenshots I took from this deployment. Let me know in case you have any follow-up questions. Just leave a comment directly in Figma or here 🙌

Can't wait to release this update 🤩 🚀

@silkeholmebonnen
Copy link
Contributor Author

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

@Alportan
Copy link
Contributor

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

Looking good! 🙌 Just last thing I noticed was the segmented control, it works as intended on mobile and smaller resolutions under 1279px width, but for 1280px and above, the control shrinks. I've attached a screenshot for reference:

image

@VIKTORVAV99
Copy link
Member

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

Looking good! 🙌 Just last thing I noticed was the segmented control, it works as intended on mobile and smaller resolutions under 1279px width, but for 1280px and above, the control shrinks. I've attached a screenshot for reference:

image

This arrow seem to have grown bigger as well, which is kind of nice but there is a lot of padding around it as well.
image

@Alportan
Copy link
Contributor

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

Looking good! 🙌 Just last thing I noticed was the segmented control, it works as intended on mobile and smaller resolutions under 1279px width, but for 1280px and above, the control shrinks. I've attached a screenshot for reference:
image

This arrow seem to have grown bigger as well, which is kind of nice but there is a lot of padding around it as well. image

Good catch, maybe it's a tad too big 😅 Let's keep it as it was before for now 🙌

@silkeholmebonnen
Copy link
Contributor Author

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

Looking good! 🙌 Just last thing I noticed was the segmented control, it works as intended on mobile and smaller resolutions under 1279px width, but for 1280px and above, the control shrinks. I've attached a screenshot for reference:

image

I have adjusted it to always have full width. Was that what you wantedf?

There is still one issue though, on ipad mini it is too wide so it doesn't look very good. I don't know what the best way to solve this is? Should we change it to only say Electricity? That would fix it i guess

image

@Alportan
Copy link
Contributor

I have made some changes based on your comments in figma:) Will you have a look again @Alportan ?

Looking good! 🙌 Just last thing I noticed was the segmented control, it works as intended on mobile and smaller resolutions under 1279px width, but for 1280px and above, the control shrinks. I've attached a screenshot for reference:
image

I have adjusted it to always have full width. Was that what you wantedf?

Yes, exactly! 🥳

There is still one issue though, on ipad mini it is too wide so it doesn't look very good. I don't know what the best way to solve this is? Should we change it to only say Electricity? That would fix it i guess

image

Hmm, indeed! I think we can do that in a PR coming after this one, but even though it looks odd, only 1.9% of users use the tablet version according to Plausible, so not sure it will have a big impact. Of course, we should correct it, but it should be fine!

@silkeholmebonnen
Copy link
Contributor Author

Okay I think it is ready to be reviewed now then!

@silkeholmebonnen silkeholmebonnen requested review from a team, madsnedergaard and tonypls and removed request for a team June 27, 2024 13:57
Copy link
Member

@madsnedergaard madsnedergaard left a comment

Choose a reason for hiding this comment

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

Maybe I'm just old and scared of changes (😅), but I feel that the text-size increases in various places are quite dramatic?

graph title
Screenshot 2024-07-01 at 14 59 43

toggle labels
Screenshot 2024-07-01 at 14 59 24

<h3 className="text-md font-bold">{t(`${translationKey}.${timeAverage}`)}</h3>
<h2>{t(`${translationKey}.${timeAverage}`)}</h2>
Copy link
Member

Choose a reason for hiding this comment

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

What are the thoughts on making this a h2? In Figma it's using text-sm (at least in the file I looked at, sorry if you have another reference)
Screenshot 2024-07-01 at 15 03 56

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, Figma is all over the place. The reference is in the design system file for now. It is an H2 there 🥳

@Alportan
Copy link
Contributor

Alportan commented Jul 3, 2024

Maybe I'm just old and scared of changes (😅), but I feel that the text-size increases in various places are quite dramatic?

Haha, that makes sense. This is just the first step, but generally it is good to have a bigger text size. I do see why you mention this as the text-size does increase dramatically in quite a few places 😅 After this PR is merged, we'll be fine-tuning a few more components, and Viktor has already started the work with the historical picker and ranking section 🙌

We do aim to increase the accessibility of our app, and there will be more things we'll tune, but we do need this global change to enable other changes 🙌

@madsnedergaard
Copy link
Member

Maybe I'm just old and scared of changes (😅), but I feel that the text-size increases in various places are quite dramatic?

Haha, that makes sense. This is just the first step, but generally it is good to have a bigger text size. I do see why you mention this as the text-size does increase dramatically in quite a few places 😅 After this PR is merged, we'll be fine-tuning a few more components, and Viktor has already started the work with the historical picker and ranking section 🙌

We do aim to increase the accessibility of our app, and there will be more things we'll tune, but we do need this global change to enable other changes 🙌

Fair point, I'll fold to the argument of accessibility 🙇

@silkeholmebonnen silkeholmebonnen enabled auto-merge (squash) July 8, 2024 09:19
@silkeholmebonnen silkeholmebonnen merged commit d185217 into master Jul 8, 2024
20 checks passed
@silkeholmebonnen silkeholmebonnen deleted the silkebonnen/avo-298-fix-font-size-issues branch July 8, 2024 09:22
@VIKTORVAV99
Copy link
Member

Really nice to see this merged! Good work Silke!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants