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: remove FormItemTopLabel multiline prop #7578

Merged
merged 9 commits into from
Sep 17, 2024

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Sep 13, 2024

  • Unit-тесты
  • e2e-тесты
  • Release notes

Описание

Сейчас в компонент FormItemTopLabel можно прокинуть проп multiline. А также данное значение можно получить из контекста FormItemContext из поля topMultiline. Поэтому нужно выпилить проп multiline и всегда брать значение из контекста.

Изменения

  • Выпилил проп multiline из FormItemTopLabel
  • Обновил скриншотные тесты
  • Реализованы кодмоды для правильного обновления, чтобы визуально ничего не сломалось

Release notes

BREAKING CHANGE

  • FormItem: у сабкомпонента FormItem.TopLabel параметр multiline был удален, теперь он всегда берется из параметра topMultiline у компонент FormItem
    <FormItem
    +  topMultiline
       top={
         <FormItem.Top>
    -      <FormItem.TopLabel htmlFor="about" multiline>Дополнительная информация</FormItem.TopLabel>
    +      <FormItem.TopLabel htmlFor="about">Дополнительная информация</FormItem.TopLabel>
           <FormItem.TopAside>0/100</FormItem.TopAside>
         </FormItem.Top>
       }
    >
      <div/>
    </FormItem>

@EldarMuhamethanov EldarMuhamethanov added this to the v7.0.0-beta.0 milestone Sep 13, 2024
@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner September 13, 2024 08:19
@EldarMuhamethanov EldarMuhamethanov marked this pull request as draft September 13, 2024 08:19
Copy link
Contributor

github-actions bot commented Sep 13, 2024

size-limit report 📦

Path Size
JS 385.19 KB (-0.02% 🔽)
JS (gzip) 116.47 KB (-0.02% 🔽)
JS (brotli) 95.59 KB (-0.06% 🔽)
JS import Div (tree shaking) 1.45 KB (0%)
CSS 330.78 KB (0%)
CSS (gzip) 41.39 KB (0%)
CSS (brotli) 32.85 KB (0%)

Copy link

codesandbox-ci bot commented Sep 13, 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.

@EldarMuhamethanov EldarMuhamethanov self-assigned this Sep 13, 2024
@EldarMuhamethanov EldarMuhamethanov changed the title feat: remove FormItemTopLabel multiline prop @EldarMuhamethanov feat: remove FormItemTopLabel multiline prop Sep 13, 2024
Copy link
Contributor

github-actions bot commented Sep 13, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Sep 13, 2024

👀 Docs deployed

Commit b5ac17e

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (aa5b849) to head (b5ac17e).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7578   +/-   ##
=======================================
  Coverage   95.21%   95.21%           
=======================================
  Files         384      384           
  Lines       11345    11346    +1     
  Branches     3720     3721    +1     
=======================================
+ Hits        10802    10803    +1     
  Misses        543      543           
Flag Coverage Δ
unittests 95.21% <100.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.

@EldarMuhamethanov EldarMuhamethanov marked this pull request as ready for review September 16, 2024 12:25
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.

Классно, что в тесты добавил комментарии, стало гораздо легче! 💯

Маленький вопорс, возможно, про лишний код.

packages/codemods/src/transforms/v7/form-item.ts Outdated Show resolved Hide resolved
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.

🔥

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.

👍

@inomdzhon inomdzhon merged commit 4902ab8 into master Sep 17, 2024
28 checks passed
@inomdzhon inomdzhon deleted the e.muhamethanov/remove-top-label-multiline branch September 17, 2024 15:28
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