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

feat(Typography): make useAccentWeight=false by default #7633

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

andrey-medvedev-vk
Copy link
Contributor

@andrey-medvedev-vk andrey-medvedev-vk commented Sep 20, 2024

related: #7549


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

Описание

Делаем useAccentWeight по умолчанию false.

Чтобы значение соответствовало названию свойства и по умолчанию отражало суть.
По умолчанию, если требуется переопределить жирность текста с помощью свойства weight - мы используем fontWeightBase токены жирности текста. Чтобы включить fontWeightAccent токены, нужно также использовать свойство useAccentWeight.

Изменения

  • useAccentWeight = false в Typography по умолчанию.
  • Добавлен codemode typography, который применяется для Typography и всех типографических компонентов, сделанных на основе Typography.
    Так как в VKUI раньше было зашито использование только fontWeightAccent токенов при использовании свойства weight, то имеет смысл включить fontWeightAccent токены там , где используется свойство weight, чтобы визуально ничего пользователям не поломать. Если weight не используется, то и добавлять useAccentWeight не нужно.

Release notes

BREAKING CHANGE

  • Typography: useAccentWeight = false по умолчанию. Когда дополнительно требуется переопределить тип начертания текста с помощью свойства weight - VKUI использует токены fontWeightBase*. Чтобы включить fontWeightAccent* токены, нужно использовать свойство useAccentWeight

@andrey-medvedev-vk andrey-medvedev-vk added this to the v7.0.0-beta.0 milestone Sep 20, 2024
@andrey-medvedev-vk andrey-medvedev-vk self-assigned this Sep 20, 2024
@andrey-medvedev-vk andrey-medvedev-vk changed the title Mendrew/use base font weight by default feat(Typography): make useAccentWeight=false by default Sep 20, 2024
Copy link
Contributor

github-actions bot commented Sep 20, 2024

size-limit report 📦

Path Size
JS 385.23 KB (-0.01% 🔽)
JS (gzip) 116.48 KB (-0.01% 🔽)
JS (brotli) 95.55 KB (-0.11% 🔽)
JS import Div (tree shaking) 1.45 KB (0%)
CSS 330.19 KB (0%)
CSS (gzip) 41.31 KB (0%)
CSS (brotli) 32.75 KB (0%)

Copy link

codesandbox-ci bot commented Sep 20, 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 Sep 20, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Sep 20, 2024

👀 Docs deployed

Commit fb9a9fd

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.19%. Comparing base (f22b76b) to head (fb9a9fd).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7633      +/-   ##
==========================================
- Coverage   95.20%   95.19%   -0.02%     
==========================================
  Files         384      383       -1     
  Lines       11354    11345       -9     
  Branches     3726     3725       -1     
==========================================
- Hits        10810    10800      -10     
- Misses        544      545       +1     
Flag Coverage Δ
unittests 95.19% <ø> (-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.

@andrey-medvedev-vk andrey-medvedev-vk marked this pull request as ready for review September 20, 2024 13:31
@andrey-medvedev-vk andrey-medvedev-vk requested a review from a team as a code owner September 20, 2024 13:31
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

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

👏

@andrey-medvedev-vk andrey-medvedev-vk merged commit e9eb0f3 into master Sep 23, 2024
52 of 53 checks passed
@andrey-medvedev-vk andrey-medvedev-vk deleted the mendrew/use-base-font-weight-by-default branch September 23, 2024 08:23
@vkcom-publisher
Copy link
Contributor

v7.0.0-beta.0 🎉

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

Successfully merging this pull request may close these issues.

4 participants