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: add pressets to storybook props #7389

Merged
merged 17 commits into from
Aug 22, 2024

Conversation

EldarMuhamethanov
Copy link
Contributor

Описание

Сейчас в Storybook в компонентах, где можно прокинуть например иконку в prop, в панели controls отображается непонятный объект, который еще и нельзя поменять из интерфейса. Нужно сделать этот процесс удобнее. Как вариант - это добавление пресетов иконок(и не только).

Изменения

  • Реализовал функцию createFieldWithPresets, которая генерирует маппинг названия иконок в саму иконку.
  • Переиспользовал функцию во всех местах, где это необходимо. Текущее поведение визуально оставил без изменений

Copy link
Contributor

github-actions bot commented Aug 14, 2024

size-limit report 📦

Path Size
JS 378.08 KB (0%)
JS (gzip) 114.65 KB (0%)
JS (brotli) 94.15 KB (0%)
JS import Div (tree shaking) 1.39 KB (0%)
CSS 306.09 KB (0%)
CSS (gzip) 39.26 KB (0%)
CSS (brotli) 31.5 KB (0%)

Copy link

codesandbox-ci bot commented Aug 14, 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 14, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Aug 14, 2024

👀 Docs deployed

Commit 8cdd3a4

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.50%. Comparing base (b125add) to head (8cdd3a4).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7389   +/-   ##
=======================================
  Coverage   94.50%   94.50%           
=======================================
  Files         375      375           
  Lines       11116    11116           
  Branches     3641     3641           
=======================================
  Hits        10505    10505           
  Misses        611      611           
Flag Coverage Δ
unittests 94.50% <ø> (ø)

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 16, 2024
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.

Крутая идея и реализация 🔥

packages/vkui/src/storybook/createFieldWithPressets.tsx Outdated Show resolved Hide resolved
packages/vkui/src/storybook/createFieldWithPressets.tsx Outdated Show resolved Hide resolved
mendrew
mendrew previously approved these changes Aug 19, 2024
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.

🔥

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.

Оч круто! 💣

packages/vkui/src/lib/presets/getFormFieldIconsPresets.tsx Outdated Show resolved Hide resolved
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 666e8b7 into master Aug 22, 2024
28 checks passed
@inomdzhon inomdzhon deleted the e.muhamethanov/storybook/add-icons-presset branch August 22, 2024 09:43
@vkcom-publisher
Copy link
Contributor

v6.6.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.

5 participants