polar
polar copied to clipboard
Add loader styles
Summary
- added serveral loaders from https://loading.io/css/ to LoadingIndicator component
- added configuration property to change loader style
- split module store to usual store files
- added setupModule action
- added setLoaderStyle mutation to change loader style at runtime
Instructions for local reproduction and review
- configure a different loader style via mapConfiguration, e.g.:
loadingIndicator: {
loaderStyle: 'RollerLoader',
},
- add a load key in packages/plugins/LoadingIndicator/src/store/state.ts:
loadKeys: new Set('dev'), - See'em rollin'
- Overwrite loader style via mutation:
map.$store.commit('plugin/loadingIndicator/setLoaderStyle', 'SpinnerLoader')E.g. in packages/clients/snowbox/src/polar-client.ts insert after line 17:
.then((map) => {
map.$store.commit('plugin/loadingIndicator/setLoaderStyle', 'bla')
return map
})
- See'em spinnin'
Also, imo, the 5 added components for the loaderStyles either need to reference the respetive loader from https://loading.io/css/ or the divs in all the components should have classes / ids to indicate that they are actually relevant (without reading the css) :D What do you think about that, @warm-coolguy?
I think it's fine as it is. For loaders, a heap of div elements is expectable.
🏓 @dopenguin
🏓 @dopenguin
🏓 @dopenguin
🏓 @ludoholic
🏓 @dopenguin