-
Notifications
You must be signed in to change notification settings - Fork 185
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
fix: fix components view with global box-sizing: border-box
#8268
Conversation
size-limit report 📦
|
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. |
e2e tests |
👀 Docs deployed
Commit 6818bd4 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🙏
давно надо было это сделать)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💠
❌ PatchНе удалось автоматически применить исправление на ветке 7.1-stable.
Чтобы изменение попало в ветку 7.1-stable, выполните следующие действия:
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
git push --set-upstream origin patch/pr8268
gh pr create --base 7.1-stable --title "patch: pr8268" --body "- patch #8268" |
# Conflicts: # packages/vkui/src/components/SubnavigationButton/SubnavigationButton.module.css
…#8270) # Conflicts: # packages/vkui/src/components/SubnavigationButton/SubnavigationButton.module.css
Описание
Сейчас есть проблема: если использовать 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