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: reexport useScroll as useRootScrollController #7813

Closed
wants to merge 1 commit into from

Conversation

inomdzhon
Copy link
Contributor


  • Release notes

Описание

Есть случаи, когда тип экспортируют через @vkontakte/vkui/dist/components/AppRoot/ScrollContext. В целом полезно иметь доступ к интерфейсу ScrollController.

Также экспортируем тип ScrollContextInterface как UseRootScrollController.

Изменения

Release notes

Улучшения

  • Добавлен экспорт useRootScrollController() – хук предоставляет API для блокировки и разблокировки скролла основного элемента, который определяется параметром scroll в AppRoot. Используется при открытии модальных окон, чтобы исправить проблемы с двойным скроллом на мобильных устройствах.

@inomdzhon inomdzhon added this to the v7.0.0-beta.1 milestone Oct 22, 2024
@inomdzhon inomdzhon self-assigned this Oct 22, 2024
@inomdzhon inomdzhon requested a review from a team as a code owner October 22, 2024 15:22
Copy link
Contributor

github-actions bot commented Oct 22, 2024

size-limit report 📦

Path Size
JS 380.67 KB (-0.03% 🔽)
JS (gzip) 115.43 KB (-0.02% 🔽)
JS (brotli) 95 KB (-0.02% 🔽)
JS import Div (tree shaking) 1.46 KB (0%)
CSS 332.15 KB (0%)
CSS (gzip) 42.09 KB (0%)
CSS (brotli) 33.18 KB (0%)

Copy link

codesandbox-ci bot commented Oct 22, 2024

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.

Copy link
Contributor

github-actions bot commented Oct 22, 2024

e2e tests

⚠️ Some screenshots were failed. See Playwright Report.

Playwright Report

Copy link
Contributor

github-actions bot commented Oct 22, 2024

👀 Docs deployed

Commit 13f0795

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.11%. Comparing base (43a6605) to head (13f0795).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7813      +/-   ##
==========================================
+ Coverage   95.08%   95.11%   +0.03%     
==========================================
  Files         376      376              
  Lines       11074    11081       +7     
  Branches     3677     3683       +6     
==========================================
+ Hits        10530    10540      +10     
+ Misses        544      541       -3     
Flag Coverage Δ
unittests 95.11% <ø> (+0.03%) ⬆️

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

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

BlackySoul
BlackySoul previously approved these changes Oct 22, 2024
Copy link
Contributor

@andrey-medvedev-vk andrey-medvedev-vk left a comment

Choose a reason for hiding this comment

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

В Release Notes написано про useRootScrollController, а в коде это useAppScrollController

Может ещё тогда немножко доки через jsdoc добавим, чтобы Release notes не был единственным источником информации о том за какой скролл отвечют хуки и где это полезно?

@inomdzhon
Copy link
Contributor Author

В Release Notes написано про useRootScrollController, а в коде это useAppScrollController

Может ещё тогда немножко доки через jsdoc добавим, чтобы Release notes не был единственным источником информации о том за какой скролл отвечют хуки и где это полезно?

ой, это изменение не допушилось... сейчас запушу, спасибо, что заметил

@inomdzhon inomdzhon force-pushed the imirdzhamolov/feat/reexport-useScroll branch from ea11cfa to 13f0795 Compare October 23, 2024 08:16
Copy link
Contributor

@andrey-medvedev-vk andrey-medvedev-vk left a comment

Choose a reason for hiding this comment

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

💅

Copy link
Contributor

Choose a reason for hiding this comment

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

Давай отдавать только useScrollLock, остальное не нужно

@inomdzhon inomdzhon marked this pull request as draft October 23, 2024 12:38
@inomdzhon
Copy link
Contributor Author

см. #7813 (comment)

@inomdzhon inomdzhon closed this Oct 23, 2024
@inomdzhon inomdzhon removed this from the v7.0.0-beta.2 milestone Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants