Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gatsby-plugin-preact]: Query on Demand, loading indicator always active #29051

Closed
fcisio opened this issue Jan 16, 2021 · 4 comments · Fixed by #29829
Closed

[gatsby-plugin-preact]: Query on Demand, loading indicator always active #29051

fcisio opened this issue Jan 16, 2021 · 4 comments · Fixed by #29829
Labels
type: bug An issue or pull request relating to a bug in Gatsby

Comments

@fcisio
Copy link

fcisio commented Jan 16, 2021

Description

With Preact as a plugin the Query on Demand loading indicator is always active and never disappears.

There's no error in the console

Steps to reproduce

  1. Upgrade Gatsby to 2.30.2
  2. Install gatsby-plugin-preact
  3. yarn develop
  4. Look for the loading indicator

Expected result

The indicator should show "whenever content is being requested upon navigation", then hide.

Actual result

The loader never disappears.

Shot_0 24

Environment

System:
OS: macOS 10.15.7
CPU: (4) x64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.12.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 87.0.4280.141
Firefox: 84.0.2
Safari: 14.0.2
npmPackages:
gatsby: ^2.26.1 => 2.30.2
gatsby-image: ^2.4.5 => 2.9.0
gatsby-link: ^2.4.13 => 2.9.0
gatsby-omni-font-loader: ^1.2.0 => 1.2.0
gatsby-plugin-emotion: ^4.3.11 => 4.5.0
gatsby-plugin-eslint: ^2.0.8 => 2.0.8
gatsby-plugin-layout: ^1.3.4 => 1.8.0
gatsby-plugin-manifest: ^2.4.9 => 2.10.0
gatsby-plugin-netlify-cache: ^1.2.0 => 1.2.0
gatsby-plugin-next-seo: ^1.6.1 => 1.6.1
gatsby-plugin-offline: ^3.2.9 => 3.8.0
gatsby-plugin-preact: ^4.0.3 => 4.5.0
gatsby-plugin-react-helmet-async: ^1.1.0 => 1.1.0
gatsby-plugin-sharp: ^2.6.9 => 2.12.1
gatsby-plugin-svgr-svgo: ^1.0.12 => 1.1.0
gatsby-plugin-theme-ui: ^0.4.0-rc.7 => 0.4.0-rc.7
gatsby-source-filesystem: ^2.3.8 => 2.9.0
gatsby-transformer-sharp: ^2.5.3 => 2.10.1

@fcisio fcisio added the type: bug An issue or pull request relating to a bug in Gatsby label Jan 16, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 16, 2021
@LekoArts LekoArts added topic: preact* and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 25, 2021
@MohamedDjoudir
Copy link

same problem

@cymkd
Copy link

cymkd commented Feb 23, 2021

same issue on gatsby@2.32.4

@yklcs
Copy link
Contributor

yklcs commented Feb 27, 2021

Still a problem, has anyone figured out what the cause is?

Meanwhile, a workaround is to inject this line of JS globally (I used a useEffect in my global layout component):

document.querySelector("body > gatsby-portal").shadowRoot.querySelector("[data-gatsby-loading-indicator='root']").style.display = "none"

@kelvindecosta
Copy link
Contributor

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants