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(ScreenSpinner): remove size prop from component #7523

Merged

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Sep 5, 2024


  • Unit-тесты
  • Документация фичи
  • Release notes

Описание

  • Проп size в компоненте ScreenSpinner не нужен и работает неправильно, поэтому нужно от него избавиться
  • Также нужно добавить возможность прокинуть в компонент кастомную иконку

Изменения

  • Удалил проп size из компонента
  • Добавил проп customIcon и state: 'custom' для отображения кастомного компонента.

Release notes

BREAKING CHANGE

  • ScreenSpinner: удалено свойство size
    <ScreenSpinner
       state="loading"
    -  size="regular"
    />
    <ScreenSpinner.Container>
    - <ScreenSpinner.Loader size="small" />
    + <ScreenSpinner.Loader />
      <ScreenSpinner.SwapIcon />
    </ScreenSpinner.Container>

Улучшения

  • ScreenSpinner: добавлена возможность прокинуть иконку для state="custom" с помощью свойства customIcon

@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner September 5, 2024 12:06
@EldarMuhamethanov EldarMuhamethanov added this to the v7.0.0 milestone Sep 5, 2024
@EldarMuhamethanov EldarMuhamethanov marked this pull request as draft September 5, 2024 12:07
Copy link
Contributor

github-actions bot commented Sep 5, 2024

size-limit report 📦

Path Size
JS 385.39 KB (+0.05% 🔺)
JS (gzip) 116.53 KB (+0.04% 🔺)
JS (brotli) 95.69 KB (+0.06% 🔺)
JS import Div (tree shaking) 1.45 KB (0%)
CSS 330.84 KB (+0.02% 🔺)
CSS (gzip) 41.39 KB (+0.02% 🔺)
CSS (brotli) 32.86 KB (+0.02% 🔺)

Copy link

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

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Sep 5, 2024

👀 Docs deployed

Commit 890836e

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.20%. Comparing base (aa5b849) to head (890836e).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...components/ScreenSpinner/ScreenSpinnerSwapIcon.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7523      +/-   ##
==========================================
- Coverage   95.21%   95.20%   -0.01%     
==========================================
  Files         384      384              
  Lines       11345    11348       +3     
  Branches     3720     3720              
==========================================
+ Hits        10802    10804       +2     
- Misses        543      544       +1     
Flag Coverage Δ
unittests 95.20% <88.88%> (-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.

…size

# Conflicts:
#	packages/vkui/src/components/ScreenSpinner/ScreenSpinner.tsx
#	packages/vkui/src/components/ScreenSpinner/ScreenSpinnerContainer.tsx
#	packages/vkui/src/components/ScreenSpinner/ScreenSpinnerLoader.tsx
#	packages/vkui/src/components/ScreenSpinner/context.ts
@EldarMuhamethanov EldarMuhamethanov marked this pull request as ready for review September 16, 2024 12:27
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.

🔥

@BlackySoul BlackySoul removed this from the v7.0.0-beta.0 milestone Sep 17, 2024
inomdzhon
inomdzhon previously approved these changes Sep 17, 2024
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
Copy link
Contributor

Конфликт(

…size

# Conflicts:
#	packages/vkui/src/components/ScreenSpinner/ScreenSpinnerLoader.tsx
@EldarMuhamethanov
Copy link
Contributor Author

Конфликт(

Разрулил

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.

Note

немного отредактировал релиз ноут

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.

@andrey-medvedev-vk andrey-medvedev-vk merged commit e2c214c into master Sep 17, 2024
27 of 28 checks passed
@andrey-medvedev-vk andrey-medvedev-vk deleted the e.muhamethanov/7466/screen-spinner-remove-size branch September 17, 2024 15:09
@EldarMuhamethanov EldarMuhamethanov added this to the v7.0.0-beta.0 milestone Sep 17, 2024
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BREAKING CHANGE][Feature]: Убрать проп size у компонента ScreenSpinner
5 participants