magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 683 forks source link

Make the "Loading" view configurable #14

Closed PWAStudioBot closed 5 years ago

PWAStudioBot commented 6 years ago

From @zetlen on May 26, 2018 6:51

This issue is a:

[ ] Bug [x] Feature suggestion [ ] Other

Description:

MagentoRouter renders a hardcoded "Loading" view while it is resolving the route. This must be configurable by the developer.

Environment and steps to reproduce

OS: Any

Magento 2 version: Any

Steps to Reproduce:

  1. Configure a PWA with Peregrine, Buildpack, and a Magento 2 store.
  2. Launch the development server with npm start.
  3. Observe the hardcoded and unstyled "Loading...".

Expected result:

A loading screen of your choosing while the URL resolves.

Possible solutions:

Currently, MagentoRouter is private. The Peregrine constructor imports and uses it directly as the child of the Redux Provider.

Additional information:

Copied from original issue: magento-research/peregrine#40

pcvonz commented 6 years ago

Can I look into this?

zetlen commented 6 years ago

But of course, @pcvonz !

pcvonz commented 6 years ago

Separated the MagentoRouter and added the ability to pass in a React component which will display when the component is loading. Let me know if this is the right direction! https://github.com/pcvonz/pwa-studio/tree/custom-loader

ericerway commented 5 years ago

Let's queue this up for grooming on Friday and include the new splash screen from @soumya-ashok -- thanks everyone!