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(Form): добавляем новый компонент Form на замену FormLayout #4576

Closed
wants to merge 19 commits into from

Conversation

eugpoloz
Copy link
Contributor

@eugpoloz eugpoloz commented Mar 23, 2023

Описание из связанной задачи:

Сначала мы хотели добавить доступность скрытой кнопке сабмита внутри FormLayout (см. #4005).

Потом пришли к выводу, что скрытой кнопки не должно быть вообще — в форме всегда должна быть какая-то очевидная и доступная всем кнопка с type="submit". В итоге решили, что лучше всего будет сделать новый компонент, а старый задепрекейтить.

Что сделала:

  • создала компонент Form без скрытого инпута
    • добавила примеры использования этого компонента
    • добавила историю в storybook
  • заменила везде в примерах FormLayout на Form
  • задепрекейтила FormLayout

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 23, 2023

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.

Latest deployment of this branch, based on commit e6dbe3e:

Sandbox Source
VKUI TypeScript Configuration

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2023

size-limit report 📦

Path Size
JS 299.52 KB (+0.14% 🔺)
JS (gzip) 86.96 KB (+0.09% 🔺)
JS (brotli) 72.16 KB (+0.15% 🔺)
JS import Div (tree shaking) 2.94 KB (0%)
CSS 276.23 KB (+0.02% 🔺)
CSS (gzip) 35.51 KB (+0.03% 🔺)
CSS (brotli) 28.14 KB (+0.03% 🔺)

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Patch coverage: 92.85% and no project coverage change.

Comparison is base (175fbb3) 81.66% compared to head (e6dbe3e) 81.67%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4576   +/-   ##
=======================================
  Coverage   81.66%   81.67%           
=======================================
  Files         278      279    +1     
  Lines        8679     8693   +14     
  Branches     2963     2968    +5     
=======================================
+ Hits         7088     7100   +12     
- Misses       1591     1593    +2     
Flag Coverage Δ
a11ytests 7.08% <61.53%> (+0.13%) ⬆️
e2e-chromium-android-dark 50.71% <55.55%> (+0.05%) ⬆️
e2e-chromium-android-light 50.71% <55.55%> (-0.05%) ⬇️
e2e-chromium-vkcom-dark 49.46% <55.55%> (-0.04%) ⬇️
e2e-chromium-vkcom-light 49.36% <55.55%> (-0.04%) ⬇️
e2e-firefox-vkcom-dark 49.36% <55.55%> (-0.04%) ⬇️
e2e-firefox-vkcom-light 49.36% <55.55%> (-0.04%) ⬇️
e2e-webkit-ios-dark 50.85% <55.55%> (-0.05%) ⬇️
e2e-webkit-ios-light 50.85% <55.55%> (-0.05%) ⬇️
e2e-webkit-vkcom-dark 49.43% <55.55%> (-0.08%) ⬇️
e2e-webkit-vkcom-light 49.43% <55.55%> (-0.08%) ⬇️
unittests 78.65% <92.85%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ages/vkui/src/components/FormLayout/FormLayout.tsx 84.61% <75.00%> (-15.39%) ⬇️
packages/vkui/src/components/Form/Form.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

👀 Styleguide deployed

See the styleguide for this PR at https://vkcom.github.io/VKUI/pull/4576/

@eugpoloz eugpoloz force-pushed the eugpoloz/4004-FormLayout-a11y branch from 12fcb02 to abb5669 Compare March 28, 2023 15:44
@Zaycevq Zaycevq marked this pull request as ready for review March 31, 2023 11:24
@Zaycevq Zaycevq requested a review from a team as a code owner March 31, 2023 11:24
@eugpoloz eugpoloz force-pushed the eugpoloz/4004-FormLayout-a11y branch from abb5669 to 4bb5df6 Compare March 31, 2023 12:21
styleguide/deprecated.js Outdated Show resolved Hide resolved
packages/vkui/src/components/FormLayout/FormLayout.tsx Outdated Show resolved Hide resolved
packages/vkui/src/components/Form/Form.tsx Outdated Show resolved Hide resolved
packages/vkui/src/components/FormLayout/FormLayout.tsx Outdated Show resolved Hide resolved
packages/vkui/src/components/Popover/Readme.md Outdated Show resolved Hide resolved
@eugpoloz eugpoloz force-pushed the eugpoloz/4004-FormLayout-a11y branch from 7309b09 to e72fa37 Compare April 7, 2023 13:27
SevereCloud
SevereCloud previously approved these changes Apr 7, 2023
SevereCloud
SevereCloud previously approved these changes Apr 7, 2023
@github-actions
Copy link
Contributor

👀 Docs deployed

Commit e6dbe3e

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может нам и не нужен компонент Form? Ведь формы это уже что-то посложнее и от проекта к проекту отличаются

С нашей стороны мы отдаём FormLayoutGroup, который помогает настроить визуальную часть, а всё остальное уже не задача ui кита

Пользователь сам своей стороне оборачивает в <form> или использует готовую библиотеку для работы с формами (например, react-final-form)


И вот задепрейкить FormLayout точно надо 👍

@github-actions github-actions bot added the pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности label Apr 19, 2023
@github-actions
Copy link
Contributor

PR закрыт из-за отсутствия активности в течение последних 14 дней. Если это произошло по ошибке или изменения все ещё актуальны, откройте PR повторно.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement][a11y] Улучшить доступность FormLayout
4 participants