Aileen Booker
154b839a8d
Removed duplicated usage of font names and replaced with class name generator from module
2024-10-24 15:20:51 +04:00
Aileen Booker
0524188bab
Added fn to return correctly generated CSS class for heading and body custom font
2024-10-24 15:01:29 +04:00
Aileen Booker
45c1be0c98
Fixed theme preview not working when reverting the default theme fonts
...
closes DES-887
- We were using an incorrect logic to determine if we need to grab the custom fonts from the data object or the settings cache when rendering `ghost_head` and `body_class`
- Instead of falling back to the settings cache if there's no font passed in the data object, we first need to check if we're in a preview context
- When knowing that we're in a preview context, we force the helpers to use the values from the passed in data object, even when those values are empty. This is the case when the custom font selected is 'Theme default'.
2024-10-24 14:13:33 +04:00
Aileen Booker
69cc1bf866
Added test to ensure we pass correct values in preview header when resetting custom font
2024-10-24 12:23:38 +04:00
Aileen Booker
369b562cda
Added acceptance test for custom fonts and preview
2024-10-23 15:00:21 +04:00
Aileen Booker
34078f9582
Fixed design playwright tests and regression bug (not rendering tabs when no custom theme settings)
2024-10-23 13:39:26 +04:00
Peter Zimon
0a17972db6
Refined font dropdown
2024-10-23 10:47:00 +02:00
Aileen Booker
64a10776ba
Fixed theme settings playwright tests
2024-10-23 09:49:40 +04:00
Aileen Booker
27dd23bd00
Updated snapshot for ghost_head tests after updating valid fonts
2024-10-23 09:23:13 +04:00
Aileen Booker
50076b317d
Build all modules and types on yarn build:ts
command
2024-10-23 09:23:13 +04:00
Aileen Booker
fc09adeefa
Fixed type errors in test
2024-10-23 09:23:13 +04:00
Aileen Booker
eae16830ce
Added tests for body_class
helper to verify custom fonts rendering
2024-10-23 09:23:13 +04:00
Peter Zimon
18683ef9d0
Updated font list
2024-10-23 09:23:13 +04:00
Aileen Booker
0aaf53636c
Added more unit tests to custom-fonts to reach 100% coverage
2024-10-23 09:23:13 +04:00
Aileen Booker
222bc89181
Renamed yarn build:types
to yarn build:ts
to ensure CI is working correctly
2024-10-23 09:23:13 +04:00
Peter Zimon
366c210783
Fixed space issue
2024-10-23 09:23:13 +04:00
Peter Zimon
cb462dfb21
Add custom fonts to the body class
...
Added `gh-font-body-[font-name]` and `gh-font-heading-[font-name]` classes to the body element to allow theme developers custom font styling.
2024-10-23 09:23:13 +04:00
Peter Zimon
b0b41e0d86
Renamed var to use namespace
2024-10-23 09:23:13 +04:00
Peter Zimon
cd6acffe54
Changed ghost head to output vars
...
- Instead of the initial concept of outputing CSS classes in Ghost head, we will output the variables directly. This results in a much cleaner result and flexibility for theme developers.
2024-10-23 09:23:13 +04:00
Aileen Booker
4d1dcea641
Updated e2e snapshots to include custom fonts feature flag
2024-10-23 09:23:13 +04:00
Aileen Booker
d29bd1ae09
Fixed failing unit test for ghost_head
...
- with a98de84753bfe1d645d9c8d36205327caa0d5e59 we changed some CSS injection
- we are doing snapshot tests for the rendered CSS result in `ghost_head`, but the tests haven't been updated to reflect those changes
2024-10-23 09:23:13 +04:00
Aileen Booker
aeab51e3a6
Fixed linting error
2024-10-23 09:23:13 +04:00
Daniël van der Winden
f64ba51330
Sorted fonts alphabetically
2024-10-23 09:23:13 +04:00
Sanne de Vries
5c52607ada
Updated design settings image
...
REF DES-829
2024-10-23 09:23:13 +04:00
Peter Zimon
123f34b252
Updated spacing in custom theme settings
2024-10-23 09:23:13 +04:00
Sodbileg Gansukh
8b28694c31
Added font-size-adjust option
...
- this allows us to fine-tune the font size for specific fonts
2024-10-23 09:23:13 +04:00
Peter Zimon
a4fde1f44b
Displaying fonts in dropdown
2024-10-23 09:23:13 +04:00
Sanne de Vries
30ca22ae81
Updated label typography
...
No ref
- Changed some labels in design and portal settings to be more consistent
2024-10-23 09:23:13 +04:00
Daniël van der Winden
298a90e175
Updated font weights for IBM Plex Serif
2024-10-23 09:23:13 +04:00
Daniël van der Winden
e3b99a77da
Updated font weights for Inter
2024-10-23 09:23:13 +04:00
Daniël van der Winden
73aceeabeb
Updated font weights for Fira Sans and Poppins
2024-10-23 09:23:13 +04:00
Aileen Booker
2d36fab089
Fixed linting error and removed done todos
2024-10-23 09:23:13 +04:00
Sodbileg Gansukh
50760765db
Updated post content heading selector
2024-10-23 09:23:13 +04:00
Aileen Booker
60a9c00663
Added tests for ghost_head to verify custom fonts CSS output
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
d0afa2d0a1
Put the new custom font settings behind a feature flag
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
bf738e2ea5
Added new BehindFeatureFlag component
...
This can be used to hide UI based on feature flags
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
0b3b59fb1e
Fixed types for custom fonts
2024-10-23 09:23:12 +04:00
Sodbileg Gansukh
08b3d872f7
Removed important rule from the injected css
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
4c8d193912
Put custom font css injection behind labs flag
2024-10-23 09:23:12 +04:00
Fabien O'Carroll
7d893aa8f7
Added customFonts
labs flag
2024-10-23 09:23:12 +04:00
Aileen Booker
0c4aaecf73
Fixed broken types and tests for custom-fonts
2024-10-23 09:23:12 +04:00
Sanne de Vries
4fa3589e06
Updated custom font list
2024-10-23 09:23:12 +04:00
Peter Zimon
9c9cffdd10
Updated theme icon in sidebar
2024-10-23 09:23:12 +04:00
Sanne de Vries
a0923a6531
Fixed merge conflict
2024-10-23 09:23:12 +04:00
Aileen Booker
f966e91451
Added unit tests to custom-fonts module
2024-10-23 09:23:12 +04:00
Aileen Booker
e1d0c286aa
Added jsdoc types to ghost_head for custom fonts
2024-10-23 09:23:12 +04:00
Sanne de Vries
7725d78670
Regrouped design setting tabs
...
REF DES-831
- Changed tabs from `Brand`, `Site wide`, `Homepage` and `Post` to `Global` and `Theme settings`.
- Added `Site wide`, `Homepage` and `Post` grouping inside the `Theme settings` tab.
2024-10-23 09:23:12 +04:00
Aileen Booker
4bf7b86ef4
Updated types so we only have to set 'Theme default' in one place
2024-10-23 09:23:12 +04:00
Aileen Booker
57c02bd6b2
Fixed CSS not being injected after save
2024-10-23 09:23:12 +04:00
Aileen Booker
52554ac7ca
Added missing heading fonts to body fonts
2024-10-23 09:23:12 +04:00