The font for navigation (346kb) is being preloaded regardless if the navigation bar is visible. In the case below it's being loaded for anonymous users.

Issue fork drupal-3443915

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mherchel created an issue. See original summary.

nod_’s picture

Priority: Normal » Major

raising to major since it interferes with the normal use of the site.

We should be looking at potentially splitting the font up to reduce size see https://github.com/zachleat/glyphhanger

mherchel’s picture

We should be looking at potentially splitting the font up to reduce size

💯💯💯

plopesc made their first commit to this issue’s fork.

plopesc’s picture

Status: Active » Needs review

Good catch 💯

Added logic to include the font if only the toolbar is being rendered.

About font split. Do you think it has to be addressed here? Or might be moved to a lower priority follow up?

finnsky’s picture

RE
#3
#3

We need to check it first:
https://github.com/zachleat/glyphhanger/issues/22

To be sure that variable fonts supported. So i guess better to do it in separated ticket.

kanchan bhogade’s picture

StatusFileSize
new182 KB

Hi,
I've tried to reproduce the issue on Drupal version 11.x
Please let me know if I've missed anything while reproducing the issue

Testing steps:

  1. Install Drupal
  2. Install Navigation and Navigation Top bar Module
  3. and checked with an Anonymous user

Adding screenshot

finnsky’s picture

StatusFileSize
new82.38 KB

Just checked in last tugboat. Seems all fine

@Kanchan Bhogade probably cache?

mherchel’s picture

About font split. Do you think it has to be addressed here? Or might be moved to a lower priority follow up?

Definitely a followup. Probably needs a bit of discussion and maybe even testing.

mherchel’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new184.09 KB
new250.43 KB

Thanks for working on this! Looks to be working as expected now. In addition to the administrator/anonymous screenshots below, I also created an authenticated user that doesn't have access to use the navigation bar and made sure the font wasn't loading for them.

Looks great!

mherchel’s picture

catch’s picture

+1 on just moving the #attached['html_head_link'] this way, makes loads of sense.

catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to 11.x, thanks! Moving to 10.3.x for backport with the rest of the navigation commits.

  • catch committed 3ac65a2e on 11.x
    Issue #3443915 by plopesc, mherchel: Font for navigation is preloaded in...

  • catch committed 993644f5 on 10.3.x
    Issue #3443915 by plopesc, mherchel: Font for navigation is preloaded in...
catch’s picture

Status: Patch (to be ported) » Fixed

  • catch committed 3ac65a2e on 11.0.x
    Issue #3443915 by plopesc, mherchel: Font for navigation is preloaded in...

Status: Fixed » Closed (fixed)

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