Use our custom fonts in Lookbook
What does this MR do and why?
This MR adds our custom fonts
stylesheets (currently split into two with a experimental FF) to the layout haml file that is used inside Lookbook for its component previews.
This way, our ViewComponent previews use the same fonts (Gitlab Sans, Gitlab Mono) as our main app does. Before, they used a system font. E.g. on Linux, that was "Ubuntu".
Screenshots or screen recordings
See the bottom-right of the screenshot. The alllllert title was the selected element. The screenshots were taken on a Linux system.
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Go to http://gdk.test:3000/rails/lookbook/inspect/pajamas/alert or any other component preview.
- Inspect a element inside the preview area, like the alert title.
- Check in your browser dev tools which font is really used. Chrome shows this Elements/Computed/Rendered Fonts
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Thomas Hutterer