Replace typography with Figma Styles

Created on 25 March 2024, 8 months ago
Updated 18 April 2024, 7 months ago

Problem/Motivation

The typography in the navigation should be set to match the Figma designs. Update the font sizes, line heights and font weights.

  • Info LG (heavy) (18px) - Drawer title (--admin-toolbar-font-size-l)
  • Info SM (heavy) (16px) -> Level 0 and 1(--admin-toolbar-font-size-base)
  • Info XS (Medium) (14px) -> Level 2 (--admin-toolbar-font-size-s)
  • Info XS (14px) -> Level 3< (--admin-toolbar-font-size-xs)/li>
  • Label (Uppercase) XS (10px) -> Menu/block label (--admin-toolbar-font-size-xxs)

Proposed resolution

Keep the font sizes and weights we already have, and correct line heights.

Also, define a layer of abstraction with the following variables in case anybody in the future wants to easily customize the navigation.

--admin-toolbar-font-size-block-title
--admin-toolbar-line-height-block-title
--admin-toolbar-font-size-level-0
--admin-toolbar-line-height-level-0
--admin-toolbar-font-size-level-1
--admin-toolbar-line-height-level-1
--admin-toolbar-font-size-level-2
--admin-toolbar-line-height-level-2
--admin-toolbar-font-size-level-3
--admin-toolbar-line-height-level-3
--admin-toolbar-font-size-popover-header
--admin-toolbar-line-height-popover-header

Current definitions that affect us from the design system:

Source URL for Figma

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States KeyboardCowboy Denver, CO, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @KeyboardCowboy
  • Status changed to Active 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States KeyboardCowboy Denver, CO, USA
  • πŸ‡ΊπŸ‡ΈUnited States KeyboardCowboy Denver, CO, USA
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Would be nice to clarify this ticket. We don't have so granular components in Navigation module, like for instance component "Text" with 50 variations. I think this ticket is more about review of the current styles for the all texts?

  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Also i see so many text variations on design. Are they all 100% used in Navigation module? Basically the scope only is sidebar + top bar. Did i miss something?

  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    I've given a thought to it and yes, we should be using only the ones the navigation needs, but with our own abstraction level. I've updated the issue summary accordingly. Sorry @KeyboardCowboy for the back and forth!

    These are the ones we're using:

    • Info LG (heavy) (18px) - Drawer title (--admin-toolbar-font-size-l)
    • Info SM (heavy) (16px) -> Level 0 and 1(--admin-toolbar-font-size-base)
    • Info XS (Medium) (14px) -> Level 2 (--admin-toolbar-font-size-s)
    • Info XS (14px) -> Level 3< (--admin-toolbar-font-size-xs)/li>
    • Label (Uppercase) XS (10px) -> Menu/block label (--admin-toolbar-font-size-xxs)

    We can keep the font sizes we have, but I would recommend defining a layer of abstraction with the following variables in case anybody in the future wants to easily customize the navigation. I know it might sound as an overkill right now, but if we want to let users customize the admin UI in the future we better start implementing easily overridable values now.

    --admin-toolbar-font-size-block-title
    --admin-toolbar-line-height-block-title
    --admin-toolbar-font-size-level-0
    --admin-toolbar-line-height-level-0
    --admin-toolbar-font-size-level-1
    --admin-toolbar-line-height-level-1
    --admin-toolbar-font-size-level-2
    --admin-toolbar-line-height-level-2
    --admin-toolbar-font-size-level-3
    --admin-toolbar-line-height-level-3
    --admin-toolbar-font-size-popover-header
    --admin-toolbar-line-height-popover-header
    
  • Merge request !221Replace typography with Figma Styles β†’ (Merged) created by kostyashupenko
  • Pipeline finished with Canceled
    8 months ago
    Total: 66s
    #135206
  • Pipeline finished with Success
    8 months ago
    Total: 201s
    #135208
  • Status changed to Needs review 8 months ago
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    1. Created list with font-size, line-height, font-weight and letter-spacing CSS variables.
    2. Font-weight - because potentially someone will want to customize font. And we have 400, 500, 600, 700 font weights in our design system. Potentially custom font will never have some of those weights, so it will be easy to override font weights from css.
    3. Letter spacings are also documented. Just to be able to customize it (coz it's pretty dangerous css property, which is working "fine" only with current font, but will not work with custom fonts)
    4. Reworked tooltip a bit (now fully matching Figma)
    5. Didn't touch breadcrumbs. We still have code related to breadcrumbs, but idk about the current state of this feature. I remember we did an override of breadcrumbs with some custom styles, but not sure if it's still actual feature or forgotten.

    I suggest you to quickly review. In case of minor feedbacks -> let's create follow-up issue, because potentially we can get some (or lots of) conflicts.

  • Status changed to Needs work 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    I've just added feedback bout the extra layer of variables for weight, which is not needed on a design system perspective.

  • Pipeline finished with Canceled
    8 months ago
    #135970
  • Status changed to Needs review 8 months ago
  • Pipeline finished with Success
    8 months ago
    #135972
  • πŸ‡·πŸ‡ΈSerbia finnsky

    I don't think toolbar-button should be related to levels somehow.

  • Status changed to Needs work 8 months ago
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Re #11
    i think i made a mistake. Because seems on design 0-level links and buttons are equal to 1-level links and buttons in terms of text

  • Assigned to ckrina
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    @finnsky you're right, I forgot the rest of elements that will come into the Top Bar. I'll take a go on this and replace this with a normal design system variables. Sorry @kostyashupenko, fo changing it. I'll work on this to close the design implementation work.

  • Pipeline finished with Success
    8 months ago
    Total: 241s
    #136271
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    Ready for review!

  • Pipeline finished with Success
    8 months ago
    Total: 233s
    #136291
  • Pipeline finished with Success
    8 months ago
    #137043
  • Pipeline finished with Success
    8 months ago
    Total: 257s
    #137050
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    mmm @ckrina i have pushed one little commit to get rid of `toolbar-button--level-1` selector.

    But i also left a comment in MR. We have so many CSS variables for fonts which will never be used seems like. Tagging to `Needs work` for discussions

  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    I have resolved my feedback on MR, but once i have pushed new commit, we need again someone to review everything

  • Status changed to Fixed 8 months ago
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    Thanks for the feedback and questions, I'll keep them in mind to prepare an explanation for it because others will have the same questions. Merging this meanwhile to prepare a release.

  • Pipeline finished with Canceled
    8 months ago
    Total: 199s
    #137372
  • Pipeline finished with Success
    8 months ago
    Total: 225s
    #137375
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    3 months ago
    Total: 469s
    #268285
  • Pipeline finished with Failed
    3 months ago
    Total: 654s
    #268942
  • Pipeline finished with Success
    3 months ago
    Total: 568s
    #268962
  • Pipeline finished with Failed
    2 months ago
    Total: 303s
    #289596
  • Pipeline finished with Failed
    2 months ago
    Total: 297s
    #289751
  • Pipeline finished with Failed
    2 months ago
    Total: 326s
    #289764
  • Pipeline finished with Failed
    2 months ago
    Total: 413s
    #289766
  • Pipeline finished with Success
    2 months ago
    Total: 449s
    #289775
  • Pipeline finished with Canceled
    2 months ago
    Total: 72s
    #289788
  • Pipeline finished with Failed
    2 months ago
    Total: 332s
    #289789
  • Pipeline finished with Canceled
    2 months ago
    Total: 368s
    #289801
  • Pipeline finished with Success
    2 months ago
    Total: 314s
    #289809
  • Pipeline finished with Failed
    21 days ago
    Total: 470s
    #329263
  • Pipeline finished with Success
    20 days ago
    Total: 158s
    #329829
  • Pipeline finished with Success
    18 days ago
    #332227
  • Pipeline finished with Success
    18 days ago
    #332230
  • Pipeline finished with Success
    4 days ago
    Total: 1103s
    #346258
Production build 0.71.5 2024