Problem/Motivation
The current implementation in Vartheme BS5 uses incorrect or hardcoded paths when preloading fonts and webfonts. This causes fonts not to be preloaded properly, affecting site performance (in some cases ) and font rendering behavior.
When working with DDEV or LAMP with a sub folder
When working with a DDEV storybook link requesting from the DDEV Varbase link
Proposed resolution
Update the theme variables and asset loading logic to use the correct Drupal routing paths for preloading fonts and webfonts, ensuring compatibility with theme base paths and aggregated asset loading.
// The path for Vartheme BS5 theme in variables.
$variables['vartheme_bs5_path'] = \Drupal::request()->getSchemeAndHttpHost() . \Drupal::request()->getBaseUrl() . '/' . \Drupal::service('extension.list.theme')->getPath('vartheme_bs5');
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-10.0.5, vartheme_bs5-3.0.7, varbase-10.1.0-alpha1, vartheme_bs5-4.0.0-alpha3
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
API changes
Data model changes
Release notes snippet
- Issue #3520246: Fixed Drupal Routing Path for Vartheme BS5 Theme to Preload Fonts and Webfonts Correctly
Comments
Comment #2
rajab natshahComment #5
rajab natshahComment #6
rajab natshahComment #7
rajab natshahComment #8
rajab natshah✅ Released vartheme_bs5-3.0.7
Comment #9
rajab natshah✅ Released vartheme_bs5-4.0.0-alpha3
Comment #10
rajab natshah✅ Released varbase-10.0.5