Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add prefetch to all pages using infinite scroll #4946

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

Jarsen136
Copy link
Contributor

Thank you for your contribution to the KodaDot NFT gallery.

👇 _ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality
  • I've posted a screenshot of demonstrated change in this PR

Optional

  • I've tested it at </bsx/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

@netlify
Copy link

netlify bot commented Feb 8, 2023

Deploy Preview for koda-nuxt ready!

Name Link
🔨 Latest commit 9948bb7
🔍 Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/63e4f4f3134cf30008aece06
😎 Deploy Preview https://deploy-preview-4946--koda-nuxt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

utils/mixins/infiniteScrollMixin.ts Outdated Show resolved Hide resolved
utils/mixins/infiniteScrollMixin.ts Outdated Show resolved Hide resolved
@roiLeo
Copy link
Contributor

roiLeo commented Feb 8, 2023

Might be time to migrate infiniteLoader to Vue composition api?

utils/mixins/infiniteScrollMixin.ts Outdated Show resolved Hide resolved
utils/mixins/infiniteScrollMixin.ts Outdated Show resolved Hide resolved
@Jarsen136
Copy link
Contributor Author

Might be time to migrate infiniteLoader to Vue composition api?

Yes, but the infiniteLoader composition migration would be blocked by the vue3 refactoring of some big components, like CollectionList, GalleryListetc.

We could implement the composition api for infinite scroll first. And then while refactoring some big list components, we could migrate the infiniteScroll composition one by one.

@Jarsen136 Jarsen136 marked this pull request as ready for review February 8, 2023 15:24
@Jarsen136 Jarsen136 requested a review from a team as a code owner February 8, 2023 15:24
@Jarsen136 Jarsen136 requested review from preschian and roiLeo and removed request for a team February 8, 2023 15:24
Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Is Debounce needed?
  • prefetching could be replace by $fetchState.pending
  • empty return 😬
  • (dom element won't work on SSR)

but ✅ wfm

utils/mixins/infiniteScrollMixin.ts Show resolved Hide resolved
utils/mixins/infiniteScrollMixin.ts Show resolved Hide resolved
utils/mixins/infiniteScrollMixin.ts Outdated Show resolved Hide resolved
@roiLeo roiLeo added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Feb 9, 2023
@codeclimate
Copy link

codeclimate bot commented Feb 9, 2023

Code Climate has analyzed commit 9948bb7 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@Jarsen136
Copy link
Contributor Author

Is Debounce needed?
empty return 😬
✅ Fixed

prefetching could be replace by $fetchState.pending
It would be better to separate the loading status from prefetch and network loading.

(dom element won't work on SSR)
I guess it's not related to the infinite scroll loading. 👀

@exezbcz
Copy link
Member

exezbcz commented Feb 10, 2023

I still have to get to the finish before the content loads. Particularly on collections

@Jarsen136
Copy link
Contributor Author

I still have to get to the finish before the content loads. Particularly on collections

On the beta env, you have to scroll to the bottom to load next page in any case. While after adding prefetch, the next pages would be auto loaded if you scroll down in normal speed.

@vikiival vikiival added this pull request to the merge queue Feb 10, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 10, 2023
@vikiival vikiival merged commit 8c123bb into kodadot:main Feb 10, 2023
This was referenced Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants