polar icon indicating copy to clipboard operation
polar copied to clipboard

Add loader styles

Open ludoholic opened this issue 1 year ago • 4 comments

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

  1. configure a different loader style via mapConfiguration, e.g.:
  loadingIndicator: {
    loaderStyle: 'RollerLoader',
  },
  1. add a load key in packages/plugins/LoadingIndicator/src/store/state.ts: loadKeys: new Set('dev'),
  2. See'em rollin'
  3. 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
    })
  1. See'em spinnin'

ludoholic avatar Aug 08 '24 12:08 ludoholic

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.

warm-coolguy avatar Aug 13 '24 04:08 warm-coolguy

🏓 @dopenguin

ludoholic avatar Aug 15 '24 08:08 ludoholic

🏓 @dopenguin

ludoholic avatar Aug 20 '24 07:08 ludoholic

🏓 @dopenguin

🏓 @ludoholic

dopenguin avatar Aug 20 '24 08:08 dopenguin

🏓 @dopenguin

ludoholic avatar Aug 30 '24 09:08 ludoholic