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

fix: fix components view with global box-sizing: border-box #8268

Merged

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Feb 13, 2025


  • e2e-тесты
  • Release notes

Описание

Сейчас есть проблема: если использовать VKUI в приложении, где глобально используется переопределение для всех элементов стиля box-sizing: border-box, то у некоторых компонентов ломается верстка. Нужно пройтись по таким компонентам и точечно там, где нужно выставить box-sizing: content-box

Изменения

Чтобы выявить необходимые компоненты для скриншотных тестов добавил глобальный класс, который переопределяет всем дочерним элементам box-sizing: border-box. Далее запустил тесты и там где тесты обновились начал смотреть - что не так.

  • В некоторых компонентах точечно добавил box-sizing: content-box
  • В некоторых скриншотных тестах пришлось тоже добавить box-sizing: content-box, чтобы убедиться, что проблема не внутри компонента. Решил оставить эти стили, чтобы в будущем можно было следить, чтобы новых проблем не возникло

Release notes

Исправления

  • Исправлена проблема с использованием библиотеки в проектах, где у всех элементов установлен стиль box-sizing: border-box

@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner February 13, 2025 10:08
@github-actions github-actions bot added the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Feb 13, 2025
Copy link
Contributor

size-limit report 📦

Path Size
JS 397.06 KB (0%)
JS (gzip) 120.59 KB (0%)
JS (brotli) 99.13 KB (0%)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.36 KB (+0.07% 🔺)
CSS (gzip) 43.13 KB (+0.08% 🔺)
CSS (brotli) 34.45 KB (+0.02% 🔺)

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.

Copy link
Contributor

e2e tests

Playwright Report

Copy link
Contributor

👀 Docs deployed

Commit 6818bd4

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.54%. Comparing base (06f24f4) to head (6818bd4).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8268   +/-   ##
=======================================
  Coverage   95.54%   95.54%           
=======================================
  Files         404      404           
  Lines       11641    11641           
  Branches     3859     3859           
=======================================
  Hits        11122    11122           
  Misses        519      519           
Flag Coverage Δ
unittests 95.54% <ø> (ø)

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.

Copy link
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.

👍 🙏

давно надо было это сделать)

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.

💠

@EldarMuhamethanov EldarMuhamethanov merged commit 85f232e into master Feb 13, 2025
29 checks passed
@EldarMuhamethanov EldarMuhamethanov deleted the e.muhamethanov/8262/fix-box-sizing-border-box branch February 13, 2025 15:24
@vkcom-publisher
Copy link
Contributor

❌ Patch

Не удалось автоматически применить исправление на ветке 7.1-stable.

Дальнейшие действия выполняют контрибьютеры из группы @VKCOM/vkui-core

Чтобы изменение попало в ветку 7.1-stable, выполните следующие действия:

  1. Создайте новую ветку от 7.1-stable и примените изменения используя cherry-pick
git stash # опционально
git fetch origin 7.1-stable
git checkout -b patch/pr8268 origin/7.1-stable

git cherry-pick --no-commit 85f232eb9b52cad76e42911030982932a9be60c0
git checkout HEAD **/__image_snapshots__/*.png
git diff --quiet HEAD || git commit --no-verify --no-edit
  1. Исправьте конфликты, следуя инструкциям из терминала
  2. Отправьте ветку на GitHub и создайте новый PR с веткой 7.1-stable (установка лейбла не требуется!)
git push --set-upstream origin patch/pr8268
gh pr create --base 7.1-stable --title "patch: pr8268" --body "- patch #8268"

EldarMuhamethanov added a commit that referenced this pull request Feb 13, 2025
# Conflicts:
#	packages/vkui/src/components/SubnavigationButton/SubnavigationButton.module.css
@EldarMuhamethanov EldarMuhamethanov mentioned this pull request Feb 13, 2025
EldarMuhamethanov added a commit that referenced this pull request Feb 13, 2025
…#8270)

# Conflicts:
#	packages/vkui/src/components/SubnavigationButton/SubnavigationButton.module.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча
Projects
None yet
4 participants