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(CalendarTime): add possibility to enter value in time pickers #8002

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Nov 26, 2024


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

Описание

Добавлена поддержка клавиатурной навигации и прямого ввода времени в компоненте CalendarTime. Также улучшена работа с фокусом в CustomSelect.

Изменения

  1. CalendarTime:
  • Добавлена навигация с помощью Tab/Shift+Tab/Enter между полями часов, минут и кнопкой "Готово"
  • Реализован прямой ввод значений времени в поля часов и минут
  • Добавлена валидация вводимых значений
  • Добавлены новые тесты для проверки функциональности
  1. CustomSelect:
  • Добавлен проп onInputKeyDown для обработки нажатий клавиш
  • Улучшена синхронизация выбранного и сфокусированного индексов

Release notes

Улучшения

  • CalendarTime: Реализована возможность прямого ввода значений времени
  • CustomSelect: Добавлено свойство onInputKeyDown для обработки события нажатия клавиши

@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner November 26, 2024 12:12
Copy link
Contributor

github-actions bot commented Nov 26, 2024

size-limit report 📦

Path Size
JS 387.19 KB (+0.21% 🔺)
JS (gzip) 117.09 KB (+0.23% 🔺)
JS (brotli) 96.47 KB (+0.23% 🔺)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 337.59 KB (0%)
CSS (gzip) 42.83 KB (0%)
CSS (brotli) 33.86 KB (0%)

Copy link

codesandbox-ci bot commented Nov 26, 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 Nov 26, 2024

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Nov 26, 2024

👀 Docs deployed

Commit 2392afe

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

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

Project coverage is 95.51%. Comparing base (efa568a) to head (2392afe).

Files with missing lines Patch % Lines
.../vkui/src/components/CalendarTime/CalendarTime.tsx 96.77% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8002   +/-   ##
=======================================
  Coverage   95.51%   95.51%           
=======================================
  Files         394      394           
  Lines       11228    11261   +33     
  Branches     3720     3727    +7     
=======================================
+ Hits        10724    10756   +32     
- Misses        504      505    +1     
Flag Coverage Δ
unittests 95.51% <97.14%> (+<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 requested a review from a team November 26, 2024 14:59
@qurle
Copy link
Contributor

qurle commented Nov 26, 2024

А можем добавить поддержку однозначных чисел?

@EldarMuhamethanov
Copy link
Contributor Author

А можем добавить поддержку однозначных чисел?

Что ты подразумеваешь? Чтобы при вводе "1" выбирался вариант "01"

@qurle
Copy link
Contributor

qurle commented Nov 26, 2024

Чтобы при вводе "1" выбирался вариант "01"?

Да

qurle
qurle previously approved these changes Nov 26, 2024
Copy link
Contributor

@qurle qurle left a comment

Choose a reason for hiding this comment

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

Круто!

qurle
qurle previously approved these changes Nov 27, 2024
…pickers

# Conflicts:
#	packages/vkui/src/components/CalendarTime/CalendarTime.test.tsx
#	packages/vkui/src/components/CalendarTime/CalendarTime.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants