f / vue-wait

Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
MIT License
2k stars 101 forks source link

add wrapLoading helper function, fix examples, fix logging format, rename spinner to loading #30

Closed sky-code closed 6 years ago

sky-code commented 6 years ago

wrapLoading helper function for easy integration of vuex-loading in vue component methods

rename v-loading slot spinner to loading - much more clear what this slot mean

Koc commented 6 years ago

@sky-code nice addition. Can we use this function as decorator? ref #15

f commented 6 years ago

Wow this is really a thing, seems neat. I agree with @Koc if that can be a decorator.

f commented 6 years ago

I'm going to merge it but won't publish a release for now.

f commented 6 years ago

Another use case, maybe we can an extend API for mapActions mappings.

...mapLoadingActions('somestore', [
  someRequest: 'something loading',
]);

...

this.someRequest(); // will start loader 'something loading'

would be awesome.

If we can make it, we can drop store helpers and move to this since loading is an UI issue and managing it in stores is kinda not-cool.

f commented 6 years ago

@sky-code And I made you a collaborator of this package since your work is awesome for this project, thank you!

sky-code commented 6 years ago

@f

I'm going to merge it but won't publish a release for now.

why not release? v0.4.0 with new feature will be good

f commented 6 years ago

@sky-code Ok then, let's do it tonight.

But this library feels me some rewrite for v1.0, I'm not very confident with bundled loaders (I think we should remove them and put just one default spinner) and also not confident with startLoader and endLoader helpers. Those parts needs to be better. Also we can create mapLoadingActions helper for Vuex bindings which would make the library cleaner.

sky-code commented 6 years ago

Agree with bundled loaders. I am not very good in vue internals so I dont know how to Implement mapLoadingActions.

Koc commented 6 years ago

rename v-loading slot spinner to loading - much more clear what this slot mean

only one wish: can you add changelog files, please? it is too hard to upgrade between releases.

sky-code commented 6 years ago

@Koc https://github.com/f/vuex-loading/blob/master/CHANGELOG.md

f commented 6 years ago

0.4.0 is now published.