Skip to content

feat: create utilities functions #6137

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

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

inomdzhon
Copy link
Contributor

@inomdzhon inomdzhon commented Nov 24, 2023

  • Unit-тесты

Описание

  • useGlobalOnClickOutside() – функция для отслеживания клика на обалсть вне целевых элементов.

  • useStableCallback() – подобие React.useCallback(), но без второго аргумента с deps.

  • createPortal() – внутри сразу фолбечит на document.body. Использую в useFloatingWithIteractions().

    Note

    Из-за особенности работы iframe в Styleguide, document.body, полученный даже через document из getDOM(), соответствует корневому элементу, а не тому, что в iframe. Создал функцию getDocumentBody(), с помощью которой нужно получать document.body и передавать в createPortal().

  • block [Enhancement][Popover] Сделать стабильным #2523

@inomdzhon inomdzhon self-assigned this Nov 24, 2023
@inomdzhon inomdzhon requested a review from a team as a code owner November 24, 2023 14:42
Copy link
Contributor

size-limit report 📦

Path Size
JS 343.67 KB (-0.01% 🔽)
JS (gzip) 105.12 KB (-0.02% 🔽)
JS (brotli) 86.92 KB (+0.04% 🔺)
JS import Div (tree shaking) 1.43 KB (0%)
CSS 259.36 KB (0%)
CSS (gzip) 33.9 KB (0%)
CSS (brotli) 27.52 KB (0%)

Copy link
Contributor

e2e tests

Playwright Report

Copy link

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 3ed3003:

Sandbox Source
VKUI TypeScript Configuration

Copy link
Contributor

👀 Docs deployed

Commit 3ed3003

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (03b0d8f) 79.58% compared to head (3ed3003) 79.65%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6137      +/-   ##
==========================================
+ Coverage   79.58%   79.65%   +0.06%     
==========================================
  Files         312      315       +3     
  Lines        9960     9994      +34     
  Branches     3330     3337       +7     
==========================================
+ Hits         7927     7961      +34     
  Misses       2033     2033              
Flag Coverage Δ
unittests 79.65% <100.00%> (+0.06%) ⬆️

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.

@inomdzhon inomdzhon merged commit 58652ee into master Nov 27, 2023
@inomdzhon inomdzhon deleted the imirdzhamolov/feat/add-new-functions branch November 27, 2023 08:39
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.

3 participants