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

fix(frontend): 連合一覧等のページネーションが壊れていたのを修正 #14439

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

samunohito
Copy link
Member

What

MkPaginationを用いて複数の項目を横に並べるような画面にて、無限スクロールが上手く働かないケースがある現象を修正しました。

  • マウスのホイールを軽く回しただけでもスクロールイベントが何回か発生する
    →連続でコールバックしないように処置を施した
  • offset.valueをクリアするタイミングが無くスクロールを繰り返すと一部アイテムが表示されなくなる
    →offsetとして分けておく必要はなさそうなのでitems.value.sizeを使うようにした

Why

fix #12766
fix #11449

Additional info (optional)

実際にローカルと自鯖にて動作確認

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added the packages/frontend Client side specific issue/PR label Aug 19, 2024
scrollRemove.value = (props.pagination.reversed ? onScrollBottom : onScrollTop)(contentEl.value, executeQueue, TOLERANCE);
scrollRemove.value = props.pagination.reversed
? onScrollBottom(contentEl.value, executeQueue, TOLERANCE)
: onScrollTop(contentEl.value, (topVisible) => { if (topVisible) executeQueue(); }, TOLERANCE);
Copy link
Member Author

Choose a reason for hiding this comment

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

上から下に向かってスクロールするときは発動させず、下から上に向かってスクロールしたときに発動するようにしています。

@samunohito samunohito marked this pull request as ready for review August 19, 2024 08:38
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 19.48%. Comparing base (a18a6ac) to head (ce10dc0).
Report is 46 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/components/MkPagination.vue 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #14439       +/-   ##
============================================
- Coverage    41.47%   19.48%   -22.00%     
============================================
  Files         1545      714      -831     
  Lines       197945   100663    -97282     
  Branches      3568      998     -2570     
============================================
- Hits         82104    19612    -62492     
+ Misses      115247    80506    -34741     
+ Partials       594      545       -49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kakkokari-gtyih
Copy link
Contributor

scroll.tsがfrontend-sharedに移動したので書き直す必要あり

@kakkokari-gtyih
Copy link
Contributor

やるか

@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消

@syuilo syuilo merged commit 98de7ca into misskey-dev:develop Sep 24, 2024
20 checks passed
@syuilo
Copy link
Member

syuilo commented Sep 24, 2024

🙏🏻

HotoRas pushed a commit to HotoRas/misskey-neko that referenced this pull request Sep 27, 2024
* fix

* fix

* fix CHANGELOG.md

* 開発環境以外でログが出ないように

---------

Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/frontend Client side specific issue/PR
Projects
None yet
3 participants