Skip to content

Conversation

@SevereCloud
Copy link
Contributor

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

Описание

Добавляем компонент для создания теней к прокручиваемой области

Release notes

Новые компоненты

  • CustomScrollViewTint: Подкомпонент, который добавляет тени к краям прокручиваемой области

@SevereCloud SevereCloud requested a review from a team as a code owner January 16, 2026 11:30
@SevereCloud SevereCloud added this to VKUI Jan 16, 2026
@SevereCloud SevereCloud added this to the v8.1.0 milestone Jan 16, 2026
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/add-CustomScrollView.Tint branch from a85a9af to 886c55f Compare January 16, 2026 11:32
@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

size-limit report 📦

Path Size
JS 412.56 KB (+0.15% 🔺)
JS (gzip) 126.71 KB (+0.19% 🔺)
JS (brotli) 104.31 KB (+0.21% 🔺)
JS import Div (tree shaking) 811 B (0%)
CSS 373.41 KB (+0.04% 🔺)
CSS (gzip) 46.3 KB (+0.09% 🔺)
CSS (brotli) 36.59 KB (+0.05% 🔺)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

e2e tests

⚠️ Some screenshots were failed. See Playwright Report.

Playwright Report

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

📊 Найдены изменения в собранных файлах: Отчет

Commit 021b56a

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

👀 Docs deployed

📦 Package ✅

yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9359/021b56a5b4776802865111dfc69af38c909d4a4f/pkg/@vkontakte/vkui/_pkg.tgz

Commit 021b56a

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.75%. Comparing base (6e3da5e) to head (021b56a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9359      +/-   ##
==========================================
+ Coverage   94.73%   94.75%   +0.02%     
==========================================
  Files         440      441       +1     
  Lines       11898    11930      +32     
  Branches     4386     4393       +7     
==========================================
+ Hits        11271    11304      +33     
+ Misses        627      626       -1     
Flag Coverage Δ
unittests 94.75% <100.00%> (+0.02%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 66 to 69
const onScroll = (e: React.UIEvent<HTMLDivElement>) => {
const target = e.currentTarget;
updateTint(target);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Пересчет теней происходит только при скролле, но при изменении размеров контейнера не происходит пересчет. Может добавить useResizeObserver?

Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov Jan 16, 2026

Choose a reason for hiding this comment

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

Я тут подумал, размер контейнера CustomScrollView может и не измениться при изменении реального размера содержимого, так что тут useResizeObserver будет бесполезным. Тут либо добавлять еще один контейнер, у которого будет меняться размер, при изменении размеров содержимого, либо забить надо это и вовсе убрать useResizeObserver, но тогда могут появиться баги в будущем

)}
{...restProps}
>
{children({ getRootRef: scrollRef, onScroll })}
Copy link
Contributor

Choose a reason for hiding this comment

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

У нас вроде не очень приветствуется использование renderFn подхода, потому что нужно мемоизировать children функцию снаружи и свойства прокидываемые в функцию. Может лучше использовать контекст как в Accordion.

@SevereCloud SevereCloud force-pushed the SevereCloud/feat/add-CustomScrollView.Tint branch from 9be823d to a778ed1 Compare January 16, 2026 13:33
@SevereCloud SevereCloud force-pushed the SevereCloud/feat/add-CustomScrollView.Tint branch from 698fda9 to 021b56a Compare January 16, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants