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

Type clean-up on Dashboard #6555

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

ekidneyrh
Copy link
Contributor

@ekidneyrh ekidneyrh commented Mar 28, 2024

What does this PR do?

Sized the text to improve the visual hierarchy of information on the Dashboard page. Also gets things in order to define type sizes in the tailwind config file in the future.

Screenshot / video of UI

This is what it looks like now:
Screenshot from 2024-03-28 11-14-41

And this is with the changes:
image

What issues does this PR fix or reference?

Would close #6547

Changes are only slight until changes are made to the type styles. This is done to avoid disruption to the ui of the rest of the app.

@slemeur
Copy link
Collaborator

slemeur commented Mar 28, 2024

This is very good work @ekidneyrh !

@deboer-tim
Copy link
Collaborator

These font sizes appear to be the same as the tailwind default so I'm not concerned about that, but:

  • We use text-xs in ~10 places, I think this would revert those to the default size since they wouldn't be found? These need to be fixed or text-xs added.
  • The defaults have line-heights, and no fontWeights. Changing the weight globally likely doesn't have a big impact, but changing the height could have one. When we removed PatternFly it changed the line height and caused lots of minor regressions, so we should check lots of screens here.
  • Tests would have to be fixed.

@ekidneyrh
Copy link
Contributor Author

We use text-xs in ~10 places, I think this would revert those to the default size since they wouldn't be found? These need to be fixed or text-xs added.

I can amend the config file and add in the xs size

The defaults have line-heights, and no fontWeights. Changing the weight globally likely doesn't have a big impact, but changing the height could have one. When we removed PatternFly it changed the line height and caused lots of minor regressions, so we should check lots of screens here.

Do you mean that the line heights have been changed here, or are you pointing out that they can be defined also?

I was focusing just on the Dashboard for the time being, but I know this has effects throughout. What way do you think would be best to do this? My original plan was to go screen by screen, but if it has major impacts throughout, then could we do everything in one PR?

@benoitf
Copy link
Collaborator

benoitf commented Mar 28, 2024

, then could we do everything in one PR?

I would opt for small PRs

(like doing it screen by screen or by component)

like : only buttons, only dashboard, etc

it's easier to see regressions/revert when it's done step by step

@deboer-tim
Copy link
Collaborator

Do you mean that the line heights have been changed here, or are you pointing out that they can be defined also?

It looks like the Tailwind defaults have line heights, so not defining them in our own would presumably remove them. It might not be the case or might not be an issue, it's just that this is a 'global' change.

@ekidneyrh
Copy link
Contributor Author

Do you think it would be better if I define the type sizes last? That way it doesn't mess up the other screens in the meantime.

ekidneyrh and others added 4 commits April 2, 2024 12:53
Signed-off-by: emma kidney <ekidney@redhat.com>

Signed-off-by: emma kidney <ekidney@redhat.com>
…archy

Signed-off-by: emma kidney <ekidney@redhat.com>

Signed-off-by: emma kidney <ekidney@redhat.com>
changing weight of small font type

Signed-off-by: Emma Kidney <87311656+ekidneyrh@users.noreply.github.com>
Signed-off-by: emma kidney <ekidney@redhat.com>
This reverts commit ef5fd69.

Signed-off-by: emma kidney <ekidney@redhat.com>
@ekidneyrh ekidneyrh changed the title Type fixes Type clean-up on Dashboard Apr 2, 2024
Signed-off-by: emma kidney <ekidney@redhat.com>
@ekidneyrh ekidneyrh marked this pull request as ready for review April 3, 2024 11:18
@ekidneyrh ekidneyrh requested review from benoitf and a team as code owners April 3, 2024 11:18
@ekidneyrh ekidneyrh requested review from jeffmaury and axel7083 and removed request for a team April 3, 2024 11:18
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

AFAIK text-bt does not exist in tailwind but I see several usage in this PR

@ekidneyrh
Copy link
Contributor Author

I have text-bt used for button text, which will be defined in the tailwind config file once the type on the rest of the pages are cleaned-up like this. It seems to just be defaulting to 16px atm.

@ekidneyrh ekidneyrh marked this pull request as draft April 4, 2024 14:27
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.

Consistent fonts on Dashboard screen
4 participants