discourse/app/assets/javascripts/wizard/addon/components
Martin Brennan db80a8ce79
FIX: Preload fonts before rerendering wizard style canvas (#22361)
]When changing fonts in the `/wizard/steps/styling` step of
the wizard, users would not see the font loaded straight away,
having to switch to another one then back to the original to
see the result. This is because we are using canvas to render
the style preview and this fails with a Chrome-based intervention
when font loading is taking too long:

> [Intervention] Slow network is detected. See
https://www.chromestatus.com/feature/5636954674692096 for more details.
Fallback font will be used while loading:
https://sea2.discourse-cdn.com/business7/fonts/Roboto-Bold.ttf?v=0.0.9

We can get around this by manually loading the fonts selected using
the FontFace JS API when the user selects them and before rerendering
the canvas. This just requires preloading more information about the
fonts if the user is admin so the wizard can query this data.
2023-07-03 11:30:26 +10:00
..
discourse-logo.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
homepage-preview.js
illustration-finished.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
illustration-members.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
illustration-welcome.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
image-preview-favicon.js
image-preview-large-icon.js
image-preview-logo-small.js
image-preview-logo.js
styling-preview.hbs
styling-preview.js
theme-preview.js
wizard-canvas.js
wizard-field-checkbox.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field-checkbox.js
wizard-field-checkboxes.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field-checkboxes.js
wizard-field-dropdown.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field-dropdown.js
wizard-field-image.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field-image.js
wizard-field-text.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field-text.js
wizard-field.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-field.js
wizard-image-preview.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-image-preview.js
wizard-preview-base.hbs
wizard-preview-base.js FIX: Preload fonts before rerendering wizard style canvas (#22361) 2023-07-03 11:30:26 +10:00
wizard-step-form.js
wizard-step.hbs DEV: Colocate wizard component templates (#20309) 2023-02-15 11:29:22 +00:00
wizard-step.js