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

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3520246: Fixed Drupal Routing Path for Vartheme BS5 Theme to Preload Fonts and Webfonts Correctly

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes

  • rajab natshah committed 87e1ed82 on 4.0.x
    Issue #3520246: Fix Drupal Routing Path for Vartheme BS5 Theme to...

  • rajab natshah committed 2c1d4f97 on 3.0.x
    Issue #3520246: Fix Drupal Routing Path for Vartheme BS5 Theme to...
rajab natshah’s picture

Assigned: rajab natshah » s.halawani
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.0-alpha1, +vartheme_bs5-4.0.0-alpha3
rajab natshah’s picture

Assigned: s.halawani » Unassigned
Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
Issue tags: +varbase-10.0.5, +vartheme_bs5-3.0.7
rajab natshah’s picture

Issue summary: View changes

✅ Released vartheme_bs5-3.0.7

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.5

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.