Gazette featured items lag

  • Author
    Posts
  • #2994127

    grinnpidgeon
    Member

    Why is there a short lag before the featured item images show up when you first go to the site? It’s not a big deal, but it’s unattractive for the menu to begin at the top and then have the featured images pop in. Makes it seem like an afterthought or playing catch-up.

    Otherwise, I like the theme. Thanks.

    The blog I need help with is mostlysewingprojects.wordpress.com.

    #2994347

    Hi, @grinnpidgeon,

    I actually think this may be related to a custom font, as it is similar to the concern in this thread. See @kathrynwp‘s response:

    We display text in the theme’s default font first. This way, people can start reading your content before the custom font loads, instead of waiting while looking at a blank page. This might mean that there’s a flash of a different font before the page finishes loading, but we think overall this is better for folks on slower connections than seeing a blank screen.

    I tested the Gazette theme with the default font and a custom font and had the same lag you have on your site with the non-default font.

    Let me know if you have additional questions, or think it may be something else.

    #2994350

    grinnpidgeon
    Member

    Interesting. I had changed the font when I had a different theme and didn’t know it would stick. I’ll try out the default. Thanks.

    #2994351

    Sure. Let me know if it makes a difference. :)

    #2994399

    grinnpidgeon
    Member

    No, it doesn’t make a difference, but I see that it even happens in the Live Demo. It’s a very short lag though, and seems even less noticeable on my iPad, where I really like the looks of the theme.

    I remembered that I have another site with featured images in a slider, and they show up late, but are below a header, so it seems less shocking: Wandering

    Anyway, I’m happy with this theme.

    #2994417

    Understood. If you have a desire to confirm with staff on what we found, add the modlook tag to this thread. I’m happy to hear you like your theme.

    Have a super weekend.

    #2994424

    I was able to recreate this issue. Entire header section loads after the menu. I have added the modlook tag as I want to know if this is the expected behaviour? Is the theme designed in such a way that Menu loads first and then the header section?

    #2994426

    grinnpidgeon
    Member

    Maybe I should note to anyone looking into this topic that the issue only looks odd in a computer browser or in landscape mode on a tablet. In portrait mode and on a phone the menu is always above the header images. It’s not an option to place the menu there in the landscape views.

    #2994427

    timethief
    Member

    only looks odd in a computer browser or in landscape mode on a tablet

    To expedite getting help from Staff I believe providing details is important. Please expand in what you posted above and post this specific info here:
    (a) Exactly what kind of device you are referring to
    (b) Exactly which browser (and version of it) you’re using by checking here if necessary http://supportdetails.com/

    #2994428

    musicdoc1
    Member

    To whom it may concern:

    Why is there a short lag before the featured item images show up when you first go to the site?

    The Gazette demo behaves the same way on my PC screen.

    #2994449

    kathrynwp
    Staff

    Hi all – just to confirm, the Featured Content-area “jump” is related to the way Gazette was built, and is not avoidable.

    #2994451

    @kathrynwp
    Thanks for confirming. I am just curious to know is there any specific reason why the theme was designed so?

    #2994452

    kathrynwp
    Staff

    It’s so the featured-content area can be positioned either above or below the menu, depending on screen size. It takes a moment for the JavaScript to detect whether the browser window is over or under 959px, and then position the featured content accordingly.

    #2994453

    grinnpidgeon
    Member

    Thanks. I love that answer.

    #2994454

    kathrynwp
    Staff

    My pleasure.

    #2994455

    Awesome answer. Thank you so much for the info, @kathrynwp!

    #2994456

    @kathrynwp
    I thought so must be Javascript but couldn’t identify one after inspecting. Just like @grinnpidgeon I am satisfied too. Thanks again :)

    #2994458

    kathrynwp
    Staff

    You’re welcome!

    This is the code itself if anyone is interested. :)

    /* Move Featured Content in the DOM depending on the screen size */
    	function featuredContentPosition() {
    		if ( $( window ).width() > 959 ) {
    			featuredContent.insertBefore( header );
    		} else {
    			featuredContent.insertBefore( primary );
    		}
    		featuredContent.show();
    	}
    
    	$( window ).load( featuredContentPosition ).resize( debounce( featuredContentPosition, 500 ) );

    https://wpcom-themes.svn.automattic.com/gazette/js/featured-content.js

The topic ‘Gazette featured items lag’ is closed to new replies.