FEATURE: Improve wizard font selection and set Inter as default font for new sites (#30974)

This commit narrows down the list of fonts we offer
in our setup wizard and simplifies things to only
show a single font dropdown. This selection will then
set the `base_font` and `heading_font` site setting to
the same value.

For existing sites that may have set different values,
we will still show 2 dropdowns when visiting the wizard.

We are also changing our default font to the more modern
selection Inter, replacing Arial. Arial is very dependent
on system installed fonts, whereas Inter we can package
to everyone in Discourse.

Finally, for existing sites that have not changed their default
from Arial, we will keep that value via a migration so we do
not surprise site owners with a completely new font.
This commit is contained in:
Martin Brennan
2025-01-27 11:29:55 +10:00
committed by GitHub
parent 08ce000647
commit 78a857931c
12 changed files with 167 additions and 34 deletions

View File

@@ -5428,6 +5428,8 @@ en:
label: "Color palette"
body_font:
label: "Body font"
site_font:
label: "Font"
heading_font:
label: "Heading font"
styling_preview:

View File

@@ -21,6 +21,12 @@
# defined in the choices option. A type:list setting with the word 'colors' in
# its name will make color values have a bold line of the corresponding color
#
# list_type: simple - Allow multiple values to be selected for the list, and new values can be defined if
# allow_any is true. This list displays like a list of items with add/remove buttons,
# and the ability to reorder items.
# list_type: compact - Allow multiple values to be selected for the list, and new values can be defined if
# allow_any is true. This list displays like the tag selector.
#
# type: enum - A single value, chosen from a set of valid values in the choices option.
# type: json_schema - The setting value is stored as JSON in the database. Used
# in the format `json_schema: ClassName` where the class implements
@@ -412,7 +418,7 @@ basic:
default: ""
hidden: true
base_font:
default: "arial"
default: "inter"
choices: "BaseFontSetting.values"
refresh: true
type: list
@@ -420,7 +426,7 @@ basic:
area: "fonts"
allow_any: false
heading_font:
default: "arial"
default: "inter"
choices: "BaseFontSetting.values"
refresh: true
type: list