gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.58k stars 1.76k forks source link

Standardize sizes of icons in buttons #48357

Open roraback opened 4 days ago

roraback commented 4 days ago

Expected behavior:

Buttons should never have icons larger than 24x24px to ensure they don't look lopsided/oversized compared to the text they're paired with. See the Figma component in the Application Design System for all of the variants. (Note, however, that we called these Large/Medium/Small/Extra Small because we'd wanted the 'extra small' to be used only in highly compact layouts and preferred to think of it as the exception more so than "extra large" size. Engineering kept the original size names and added Extra Large (our "Large") to the set.)

Icon sizes that I expect (using the size names from the React component) are half of the height of the buttons they sit in:

Current behavior:

  1. Icons are all too large except in the small button variant. This results in a somewhat lopsided appearance and insufficient padding around icons on certain buttons:
    • Extra large: 32px (should be 24px)
    • Large: 24px (should be 20px)
    • Medium: 20px (should be 16px)
    • Small: 16px (correct)
  2. The Extra Large button variant is currently 44px tall, but should be 48px to match designs (and to be double the icon proportions).
  3. It also looks like the Large button size might have some wonky horizontal padding around icons—the icon section of the large segmented button is not square. I assume this will be fixed with the icon size change, though, because padding will need to be revisited with a new icon size.

Bug details:

bl-nero commented 3 days ago

After consulting further with @roraback and @rudream, I'm going to reclassify this one as a feature request, as we currently don't even have a component that would apply standard icon sizes across the board.