vue-infinite-loading icon indicating copy to clipboard operation
vue-infinite-loading copied to clipboard

Vue 3 Compatibility

Open nVitius opened this issue 3 years ago • 33 comments

This patch enables compatibility with Vue 3. Aside from a couple deprecations that were fixed, I changed the build tool to rollup in stead of webpack.

Tests will likely need to be updated.

nVitius avatar May 01 '21 05:05 nVitius

Thank you so much for this.

printscreen avatar May 01 '21 17:05 printscreen

Thanks for your nice work! Maybe dev on full-clean branch then release a major version would be better?

PeachScript avatar Jun 15 '21 02:06 PeachScript

And can this PR be released as an alpha version? Maybe the temp version that supported Vue.js 3.0 be helpful to users, we can release a version first, and then continue to improve it

PeachScript avatar Jun 15 '21 02:06 PeachScript

@PeachScript when merge ? and can I use nuxt width used composition api ?

productdevbook avatar Jun 27 '21 15:06 productdevbook

@PeachScript when merge ? and can I use nuxt width used composition api ?

After all test cases updated. But we can first release a alpha version if @nVitius confirm this PR can be released

PeachScript avatar Jun 28 '21 04:06 PeachScript

@PeachScript Sorry for the late reply from me. If you make a new branch on the main repo (I called mine next. I've seen that in a lot of other vue libs working on v3 support), I can change the PR to go there and we can merge in and make the alpha release. I'll also add a commit to update the package.json with a -beta version so we can publish to npm.

nVitius avatar Jun 30 '21 04:06 nVitius

@nVitius thanks for your reply ❤️ I've already create the next branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version [email protected] base on the PR branch, as the temporary way for Vue.js 3.0 projects.

@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D

PeachScript avatar Jun 30 '21 05:06 PeachScript

@nVitius thanks for your reply ❤️ I've already create the next branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version [email protected] base on the PR branch, as the temporary way for Vue.js 3.0 projects.

@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D

iam nuxt 2, vue 2 with nuxt compotion api. I can say that nuxt 3 will be out soon then. then i can try :D

productdevbook avatar Jun 30 '21 06:06 productdevbook

Currently, the spinner setting for the alpha version is very wired. You have to assign it like the following:

<infinite-loading :identifier="identifier" @infinite="load" :spinner="2">
  <template v-slot:no-more>no more</template>
  <template v-slot:no-results>no results</template>
</infinite-loading>

It's using an index to represent various spinner listed in the doc.

A brief inspection into the codes in src shows that it is due to the processing of spinnerView variable from the props.

phantomlsh avatar Aug 17 '21 17:08 phantomlsh

@phantomlsh Thanks for the report! I just pushed a commit that should fix that issue. Will you test it out when you have the chance? Until a new npm version is released, you can install it like this: npm i --save 'github:nvitius/vue-infinite-loading#next'

nVitius avatar Aug 18 '21 00:08 nVitius

@nVitius Thanks for your work but i tested with your fork and the issue reported by @phantomIsh persists

noeGnh avatar Aug 19 '21 17:08 noeGnh

There is another bug with spinner. If you use custom tag with slot="spinner" or <template #spinner> it doesn't hide the spinner after loading. It does for default spinners, but not from custom. I had to hide it myself right after the $state.complete()

noeGnh avatar Aug 19 '21 17:08 noeGnh

I forgot to re-run the build before committing. I pushed another commit with the updated dist files.

@noeGnh Could you provide a small reproduction for the custom spinner issue? We are using v-show on the parent div of the spinner slot. I don't immediately see why it wouldn't work.

nVitius avatar Aug 19 '21 19:08 nVitius

Hi @nVitius, here is a reproduction of the issue: https://codesandbox.io/s/vue-infinite-loading-issue-pi6cj

noeGnh avatar Aug 20 '21 14:08 noeGnh

@noeGnh Thanks for setting that up. I worked a bit on this over the weekend. It looks like Vue 3 has an issue where a v-bind:style that is undefined will overwrite the style on the element and set it to empty. I've opened a PR on the Vue repo to try and address it. In the meantime, I've fixed it so that slotStyles compute to an empty object instead of undefined.

nVitius avatar Aug 23 '21 21:08 nVitius

@nVitius Thanks for your work !

noeGnh avatar Aug 24 '21 16:08 noeGnh

@PeachScript Can you publish the new build to npm?

I've had the opportunity to work extensively with the Composition API over the past 6 months or so. I want to take some time soon and refactor the components in here to use it, as well as update the tests and such so we can get this PR merged in.

nVitius avatar Aug 31 '21 04:08 nVitius

Is there any update on this issue?

Sublime1 avatar Sep 21 '21 11:09 Sublime1

Any update on this?

shashank261 avatar Sep 23 '21 18:09 shashank261

Currently, the spinner setting for the alpha version is very wired. You have to assign it like the following:

<infinite-loading :identifier="identifier" @infinite="load" :spinner="2">
  <template v-slot:no-more>no more</template>
  <template v-slot:no-results>no results</template>
</infinite-loading>

It's using an index to represent various spinner listed in the doc.

A brief inspection into the codes in src shows that it is due to the processing of spinnerView variable from the props.

I cannot have empty(no value) in the slots. It is possible with the previous version.

shashank261 avatar Sep 24 '21 15:09 shashank261

@shashank261 Thanks for the report. I just pushed up a commit that should fix that issue. You can try it out by installing from my fork: npm i --save 'github:nvitius/vue-infinite-loading#next'

nVitius avatar Sep 24 '21 18:09 nVitius

Hi, can someone explain what has to happen for this to make it into the main release? We're waiting on this over on https://github.com/antoine92190/vue-advanced-chat

Thanks!

Sublime1 avatar Oct 11 '21 12:10 Sublime1

@PeachScript any progress ?

productdevbook avatar Nov 29 '21 06:11 productdevbook

@nVitius thanks for your reply ❤️ I've already create the next branch, but I hope merge it after we completed code review & test cases paased, so I've published an pre-alpha version [email protected] base on the PR branch, as the temporary way for Vue.js 3.0 projects.

@printscreen @productfrontenddeveloper it would be better if you could test it with your projects and feedback :D

@PeachScript We have been using 3.0.0-alpha.0-0 in production with no problem. Just following up from your previous comment.

printscreen avatar Nov 29 '21 06:11 printscreen

npm i --save 'github:nvitius/vue-infinite-loading#next'

vue3 testted good working

productdevbook avatar Nov 29 '21 06:11 productdevbook

 node --version
v16.13.2
  npm --version
8.1.2

Hangs on install during "reify:nan" in "reify:audit" after these lines

npm http fetch GET 200 https://registry.npmjs.org/vue-loader 246ms (cache hit)
npm timing metavuln:packument:vue-loader Completed in 255ms
npm timing metavuln:load:security-advisory:vue-loader:Pp1IW5wVzYexdOySlO/aAbqI2U/7il4gIjSOUDymIHC8cUtXeZL9vUdcRSFS5haoxlwjfhRs5hiV4iRUz1rJCg== Completed in 2ms
npm timing metavuln:calculate:security-advisory:vue-loader:Pp1IW5wVzYexdOySlO/aAbqI2U/7il4gIjSOUDymIHC8cUtXeZL9vUdcRSFS5haoxlwjfhRs5hiV4iRUz1rJCg== Completed in 257ms
npm timing metavuln:cache:get:security-advisory:listr-update-renderer:zOQB0PbNfy+2HdBM0HrEL+BwfaUzJTv9ZlpJZ9JwcOJoaxHQN021S+9kwPsfZq0g9Uo1y3UYYMrWP0QqWPB5hQ== Completed in 2ms
npm timing metavuln:load:security-advisory:listr-update-renderer:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 0ms
npm timing metavuln:calculate:security-advisory:listr-update-renderer:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 2ms
npm timing metavuln:cache:get:security-advisory:@graphql-codegen/cli:6RQfdYOpFrVbzP+x3+oJvOOUSeIkwVhgGpKW5eLzfyRpGhXaDnseLtaQstrjmNAjI6NG9QDqKh7yLxYKOGd7TQ== Completed in 5ms
npm timing metavuln:load:security-advisory:@graphql-codegen/cli:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 216ms
npm timing metavuln:calculate:security-advisory:@graphql-codegen/cli:J06/DTp8oqjxiBqYUWpEItMGCNfkKxzmVHNyz719u956SNJBNE5sR3ZQug0yKGv6PDdcwyMyG5eV8oIV9wifzw== Completed in 222ms
npm timing auditReport:init Completed in 2586ms
npm timing reify:audit Completed in 3200ms

gustawdaniel-acaisoft avatar Jan 31 '22 10:01 gustawdaniel-acaisoft

@PeachScript please pull merge.

productdevbook avatar Mar 11 '22 12:03 productdevbook

Does not work if more than one InfiniteLoading component on the same page I think stateChanger is shared on ALL InfiniteLoading

kuro96al avatar Mar 13 '22 09:03 kuro96al

When are you planning to make release for Vue.js 3 support?

bhanu2217 avatar Oct 03 '22 06:10 bhanu2217

@printscreen is this 3.0.0-alpha.0-0 version works with multiple component on the same page ? because for me it is not working if one component doesn't have data then the other component stopped the infinite loading and show just the initial loaded data. what to do ?

santhanakrishnanstark avatar Oct 19 '22 06:10 santhanakrishnanstark