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(Group): refactor styles for fix adaptivity #7284

Merged

Conversation

inomdzhon
Copy link
Contributor

@inomdzhon inomdzhon commented Aug 2, 2024


  • Дизайн-ревью

Описание

  • реструктурировал CSS файл, чтобы было понятней что к чему;
  • размеры заменил на токены из @vkonktate/vkui-tokens;
  • отказался от использования <Separator /> из-за того, что его задевает vkuiInternalModalPage, вместо этого объединил Group__separator--spacing и Group__separator--separator в один элемент Group__separator;
  • добавил модификатор Group--sizeX--regular, т.к. он определяет mode как "card" при sizeX="regular", если mode === "none";
  • вынес <Separator /> из <div /> в ModalPageHeader.tsx, чтобы боковые отступы не влияли на размеры сепаратора.

Дизайн

Внутри ModalPage

При platform="android"/platform="ios" и sizeX="regular" в ModalPageHeader удаляем отступы у Separator.

image image

до и после


@inomdzhon inomdzhon requested a review from a team as a code owner August 2, 2024 17:23
@github-actions github-actions bot added the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Aug 2, 2024
@inomdzhon inomdzhon removed the patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Aug 2, 2024
Copy link
Contributor

github-actions bot commented Aug 2, 2024

size-limit report 📦

Path Size
JS 380.44 KB (+0.02% 🔺)
JS (gzip) 116.03 KB (+0.03% 🔺)
JS (brotli) 95.44 KB (-0.02% 🔽)
JS import Div (tree shaking) 1.39 KB (0%)
CSS 307.19 KB (+0.41% 🔺)
CSS (gzip) 39.37 KB (+0.28% 🔺)
CSS (brotli) 31.63 KB (+0.36% 🔺)

Copy link

codesandbox-ci bot commented Aug 2, 2024

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

github-actions bot commented Aug 2, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Aug 2, 2024

👀 Docs deployed

Commit 78c59e5

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 83.54%. Comparing base (a5ffcd8) to head (78c59e5).
Report is 2 commits behind head on master.

Files Patch % Lines
packages/vkui/src/components/Group/Group.tsx 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7284      +/-   ##
==========================================
+ Coverage   83.45%   83.54%   +0.09%     
==========================================
  Files         369      369              
  Lines       11175    11152      -23     
  Branches     3656     3643      -13     
==========================================
- Hits         9326     9317       -9     
+ Misses       1849     1835      -14     
Flag Coverage Δ
unittests 83.54% <53.84%> (+0.09%) ⬆️

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.

mendrew
mendrew previously approved these changes Aug 5, 2024
@inomdzhon inomdzhon force-pushed the imirdzhamolov/issue4656/fix/modalpage-and-group-adaptivity branch from b7104e9 to 0508582 Compare August 5, 2024 13:49
@inomdzhon inomdzhon marked this pull request as draft August 5, 2024 14:02
@inomdzhon inomdzhon marked this pull request as ready for review August 6, 2024 08:58
Copy link

@Zaycevq Zaycevq 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

@mendrew mendrew 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 merged commit 823980b into master Aug 7, 2024
48 of 49 checks passed
@inomdzhon inomdzhon deleted the imirdzhamolov/issue4656/fix/modalpage-and-group-adaptivity branch August 7, 2024 10:40
inomdzhon added a commit that referenced this pull request Aug 8, 2024
Класс должен был быть ещё в PR #7284, но видимо случайно ревертнул когда пушил.

Также исправляем тест из под #7333 – падал из-за того, что в PR был старый мастер без #7284.
inomdzhon added a commit that referenced this pull request Aug 8, 2024
Класс `Group--sizeX-regular` должен был быть ещё в PR #7284, но видимо случайно ревертнул когда пушил. Без него не будет автоопределения для `mode="card"`, когда `mode === "none"` и `sizeX === "regular"`.

Также исправляем тест из под #7333 – падал из-за того, что в PR был старый мастер без #7284.

---

- caused by #7284, #7333
inomdzhon added a commit that referenced this pull request Aug 9, 2024
Класс `Group--sizeX-regular` должен был быть ещё в PR #7284, но видимо случайно ревертнул когда пушил. Без него не будет автоопределения для `mode="card"`, когда `mode === "none"` и `sizeX === "regular"`.

Также исправляем тест из под #7333 – падал из-за того, что в PR был старый мастер без #7284.

---

- caused by #7284, #7333
inomdzhon added a commit that referenced this pull request Aug 9, 2024
Класс `Group--sizeX-regular` должен был быть ещё в PR #7284, но видимо случайно ревертнул когда пушил. Без него не будет автоопределения для `mode="card"`, когда `mode === "none"` и `sizeX === "regular"`.

Также исправляем тест из под #7333 – падал из-за того, что в PR был старый мастер без #7284.

---

- caused by #7284, #7333
inomdzhon added a commit that referenced this pull request Aug 9, 2024
Класс `Group--sizeX-regular` должен был быть ещё в PR #7284, но видимо случайно ревертнул когда пушил. Без него не будет автоопределения для `mode="card"`, когда `mode === "none"` и `sizeX === "regular"`.

Также исправляем тест из под #7333 – падал из-за того, что в PR был старый мастер без #7284.

---

- caused by #7284, #7333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants