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

Rename govuk-typography-responsive #4243

Closed
3 tasks done
Tracked by #2289
owenatgov opened this issue Sep 21, 2023 · 5 comments · Fixed by #4291
Closed
3 tasks done
Tracked by #2289

Rename govuk-typography-responsive #4243

owenatgov opened this issue Sep 21, 2023 · 5 comments · Fixed by #4291
Assignees
Milestone

Comments

@owenatgov
Copy link
Contributor

owenatgov commented Sep 21, 2023

What

Rename the mixin govuk-typoraphy-responsive to something that more clearly dictates what it does.

Why

It emerged during #3837 that users may not understand how to use govuk-font is it is intended. Part of this is driven by the fact that users don't know about govuk-typography-responsive as the mixin that handles the retrieval of font-size and line-height from the typography scale. Part of this can be handled by documenting it better however we have a reckon that a more appropriate name would help users understand it at a glance and recall it easier.

A name that emerged during the linked spike is govuk-font-size however this isn't set in stone.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • A new name is decided
  • The new name is applied
  • govuk-typography-responsive is deprecated
@36degrees
Copy link
Contributor

It looks like it's already covered in the done whens (thanks! 🙌🏻 ) but we should follow our process for renaming Sass mixins for this.

@owenatgov owenatgov moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Sep 25, 2023
@owenatgov owenatgov self-assigned this Sep 27, 2023
@owenatgov owenatgov moved this from Sprint Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Sep 27, 2023
@querkmachine
Copy link
Member

govuk-font-size feels like a nice, self-explanatory name. Helps that it's aligned with the name of the existing font-size property, which is already something we aim to do with the naming of components.

That does make me wonder if there needs to be some formality introduced as to how all the mixins are named though. Some begin with govuk-typography and others use govuk-font. The likes of govuk-typography-weight-regular would probably be more intuitively named govuk-font-weight-regular, etc.

That might be spinning off a whole other bunch of changes, though 😅

@owenatgov
Copy link
Contributor Author

@querkmachine Excellent point. I do wonder if there's an argument to changing all our typography mixins to use a govuk-font-xyz prefix. To me, that feels easier to parse than "typography" although there are arguments for both eg: when we use govuk-typography-common we aren't just applying a font, we're applying some settings that are central to our typography.

I can guess at the reason for at least the weight mixins since they're tied explicitly to the $govuk-font-weight-bold and $govuk-font-weight-regular variables. Having mixins and vars with the same name is a bit messy. Having said that, I do wonder if we can't make them both a bit more nuanced ie: have a single govuk-font-weight mixin.

I personally would like to do some data gathering on our naming somewhen during the lifecycle of the typography work since it feels non-trivial to change in-flight mixins in our API. I'm thinking about polling the community about this. We already have #4276, maybe instead of being specifically about the need for a mixin we ask about our font mixins in general?

@owenatgov
Copy link
Contributor Author

The team have picked a new name: govuk-font-size.

@owenatgov
Copy link
Contributor Author

Moving this into blocked until we're ready to launch this

@owenatgov owenatgov moved this from Needs review 🔍 to Blocked ⛔ in GOV.UK Design System cycle board Oct 9, 2023
@owenatgov owenatgov modified the milestones: v5.1, v5.2 Oct 12, 2023
@owenatgov owenatgov moved this from Blocked ⛔ to Backlog 🗄 in GOV.UK Design System cycle board Nov 22, 2023
@owenatgov owenatgov moved this from Backlog 🗄 to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Dec 15, 2023
@owenatgov owenatgov moved this from Sprint Backlog 🏃🏼‍♀️ to Needs review 🔍 in GOV.UK Design System cycle board Dec 18, 2023
@owenatgov owenatgov moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Jan 4, 2024
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants