I’m using the Dawn theme in this. I need to troubleshoot why there is a loading in the header part. I don’t want that. How can I remove this.
website: Amber Silverz
password: amber
A user is experiencing an unwanted loading spinner appearing in the header of their Dawn theme store, specifically related to the predictive search feature.
Root Cause Identified:
component-predictive-search.css) loads asynchronously, causing a brief visibility of the spinner before styles are applied.Proposed Solutions:
CSS Loading Optimization (Primary recommendation):
layout/theme.liquid to load the predictive search stylesheet synchronously instead of asynchronously{{ 'component-predictive-search.css' | asset_url | stylesheet_tag }}CSS Override Method (Alternative approach):
base.css to hide the spinner specifically in the header: .header-wrapper .loading-overlay__spinner { display: none !important; }Status: Multiple solutions provided; awaiting user implementation and feedback.
I’m using the Dawn theme in this. I need to troubleshoot why there is a loading in the header part. I don’t want that. How can I remove this.
website: Amber Silverz
password: amber
Reach out to whoever added search field to your header – it’s part of the predictive search modal…
@tim_1 Thanks for your reply, whether this is app related or this search bar customization related
Customization, I guess…
Hi @Sivadarshan,
This may be because the predictive search css is loaded later, so the loading icon will be visible.
Please go to layout > theme.liquid file, find ‘component-predictive-search.css‘ and change code:
Code:
{{ 'component-predictive-search.css' | asset_url | stylesheet_tag }}
If I helped you, then a Like would be truly appreciated.
@namphan, If i remove those code, there will be no loading right
What @namphan is saying is that instead of the code on lines 78-83, you can use the code they suggested.
I’d say you can simply remove lines 81 and 82 – would be the same.
This will ensure this stylesheet loads ASAP.
Ultimately, you can try
{{ 'component-predictive-search.css' | asset_url | stylesheet_tag: preload: true }}
and move it up to be next to the
Hi,
Hope this will help
CSS example
/* Hide the brown loading ring in the HEADER only */
.header-wrapper .loading-overlay__spinner,
.header-wrapper svg.spinner {
display: none !important;
}
Code example
/* Nuclear option: hide every spinner on the site */
.loading-overlay__spinner,
svg.spinner {
display: none !important;
}