VKUI icon indicating copy to clipboard operation
VKUI copied to clipboard

feat(ScrollSaver): Add component to save scroll position of elements with scroll box

Open mendrew opened this issue 1 year ago • 6 comments

  • close #3750

  • [ ] Unit-тесты
  • [ ] e2e-тесты
  • [ ] Дизайн-ревью
  • [ ] Документация фичи

Описание

Добавлен новый компонент-обёртка ScrollSaver и его разновидности: хук useScrollSaver и ScrollSaverWithoutChildren. Основная цель компонента ScrollSaver сохранять позицию скролла дочернего элемента при переходах между View и Panel.

Изменения

mendrew avatar Oct 20 '23 12:10 mendrew

size-limit report 📦

Path Size
JS 333.76 KB (+0.3% 🔺)
JS (gzip) 102.03 KB (+0.39% 🔺)
JS (brotli) 84.21 KB (+0.35% 🔺)
JS import Div (tree shaking) 2.71 KB (0%)
CSS 255.23 KB (0%)
CSS (gzip) 33.57 KB (0%)
CSS (brotli) 27.25 KB (0%)

github-actions[bot] avatar Oct 20 '23 12:10 github-actions[bot]

e2e tests

Playwright Report

github-actions[bot] avatar Oct 20 '23 12:10 github-actions[bot]

👀 Docs deployed

Commit 722ea959d9e666a53edd1dde0643e50c6877c1a9

github-actions[bot] avatar Oct 20 '23 12:10 github-actions[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 805c715f634302dba6e59d56fb0af235c3f2e026:

Sandbox Source
VKUI TypeScript Configuration

codesandbox-ci[bot] avatar Oct 20 '23 13:10 codesandbox-ci[bot]

Codecov Report

Attention: 55 lines in your changes are missing coverage. Please review.

Comparison is base (c913f62) 82.00% compared to head (805c715) 79.40%.

:exclamation: Current head 805c715 differs from pull request most recent head 722ea95. Consider uploading reports for the commit 722ea95 to get more accurate results

Files Patch % Lines
.../vkui/src/components/ScrollSaver/useScrollSaver.ts 13.15% 33 Missing :warning:
.../src/components/ScrollSaver/ScrollSaverContext.tsx 35.71% 9 Missing :warning:
packages/vkui/src/hooks/usePatchChildrenRef.ts 0.00% 7 Missing :warning:
...es/vkui/src/components/ScrollSaver/ScrollSaver.tsx 57.14% 3 Missing :warning:
...components/ScrollSaver/ScrollSaverWithCustomRef.ts 25.00% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6011      +/-   ##
==========================================
- Coverage   82.00%   79.40%   -2.61%     
==========================================
  Files         327      309      -18     
  Lines       10149    10272     +123     
  Branches     3418     3616     +198     
==========================================
- Hits         8323     8156     -167     
- Misses       1826     2116     +290     
Flag Coverage Δ
unittests 79.40% <21.42%> (-2.61%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 20 '23 13:10 codecov[bot]

PR закрыт из-за отсутствия активности в течение последних 14 дней. Если это произошло по ошибке или изменения все ещё актуальны, откройте PR повторно.

github-actions[bot] avatar Nov 08 '23 10:11 github-actions[bot]