Skip to content

fix(useAdaptivityWithJSMediaQueries): replace console.error with warnOnce for SSR warnings#9392

Merged
inomdzhon merged 1 commit intoVKCOM:masterfrom
pajecawav-vk:fix/warnonce-ssr-adaptivity-hooks
Feb 2, 2026
Merged

fix(useAdaptivityWithJSMediaQueries): replace console.error with warnOnce for SSR warnings#9392
inomdzhon merged 1 commit intoVKCOM:masterfrom
pajecawav-vk:fix/warnonce-ssr-adaptivity-hooks

Conversation

@pajecawav-vk
Copy link
Copy Markdown
Contributor

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

Описание

Каждый вызов useAdaptivityWithJSMediaQueries в SSR генерировал ворнинг который засорял логи, поправил console.error на warnOnce

image

Изменения

Release notes

  • useAdaptivityWithJSMediaQueries: поправлено предупреждение о вызове хука вне браузера. Теперь предупреждение будет выводиться один раз

@pajecawav-vk pajecawav-vk requested a review from a team as a code owner January 23, 2026 14:41
@github-actions
Copy link
Copy Markdown
Contributor

e2e tests

⚠️ Some screenshots were failed. See Playwright Report.

Playwright Report

@github-actions
Copy link
Copy Markdown
Contributor

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

Commit 93c852a

@github-actions
Copy link
Copy Markdown
Contributor

👀 Docs deployed

📦 Package ✅

yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9392/93c852a1341570a68324ed8fe2816aaaa17af80d/pkg/@vkontakte/vkui/_pkg.tgz

Commit 93c852a

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.73%. Comparing base (8dfd899) to head (93c852a).
⚠️ Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
.../vkui/src/hooks/useAdaptivityWithJSMediaQueries.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9392   +/-   ##
=======================================
  Coverage   94.73%   94.73%           
=======================================
  Files         440      440           
  Lines       11898    11899    +1     
  Branches     4386     4386           
=======================================
+ Hits        11271    11272    +1     
  Misses        627      627           
Flag Coverage Δ
unittests 94.73% <50.00%> (+<0.01%) ⬆️

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.

@vkcom-publisher vkcom-publisher added pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности and removed pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности labels Jan 31, 2026
@inomdzhon inomdzhon added this to VKUI Feb 2, 2026
@inomdzhon inomdzhon moved this to 👀 In Review in VKUI Feb 2, 2026
@inomdzhon inomdzhon added this to the v8.0.1 milestone Feb 2, 2026
Copy link
Copy Markdown
Contributor

@inomdzhon inomdzhon left a comment

Choose a reason for hiding this comment

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

👍

@inomdzhon inomdzhon modified the milestones: v8.0.1, v7.11.3 Feb 2, 2026
@inomdzhon inomdzhon merged commit c6fbea0 into VKCOM:master Feb 2, 2026
28 of 29 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in VKUI Feb 2, 2026
inomdzhon pushed a commit that referenced this pull request Feb 2, 2026
@inomdzhon inomdzhon mentioned this pull request Feb 2, 2026
inomdzhon added a commit that referenced this pull request Feb 2, 2026
…Once for SSR warnings (#9392) (#9437)

Co-authored-by: pajecawav-vk <133758781+pajecawav-vk@users.noreply.github.com>
vkcom-publisher pushed a commit that referenced this pull request Feb 2, 2026
…Once for SSR warnings (#9392) (#9437)

Co-authored-by: pajecawav-vk <133758781+pajecawav-vk@users.noreply.github.com>
@vkcom-publisher
Copy link
Copy Markdown
Contributor

v7.11.3 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants