8000 feat(Calendar,DateInput): add prop timezone by EldarMuhamethanov · Pull Request #8331 · VKCOM/VKUI · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(Calendar,DateInput): add prop timezone #8331

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

Merged
merged 9 commits into from
Mar 19, 2025

Conversation

EldarMuhamethanov
Copy link
Contributor

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

Описание

В некоторых ситуациях нужно время в компонентах DateInput и Calendar отображать в специфичной таймзоне. Нужно добавить свойство timezone для этих компонентов

Изменения

Поисследовал тему timezone и понял, что для компонентов DateRangeInput и CalendarRange свойство timezone не имеет смысла, так как в них не отображается время.
Также, чтобы работать с таймзонами, используя date-fns, нужно подключить библиотеку date-fns-tz

  • Добавил в компоненты Calendar и DateInput свойство timezone
  • Добавил тесты для компонентов со специфичной таймзоной

Release notes

Улучшения

  • Calendar: Добавлено свойство timezone для отображения времени в нужной таймзоне
  • DateInput: Добавлено свойство timezone для отображения времени в нужной таймзоне

@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner March 6, 2025 08:55
Copy link
codesandbox-ci bot commented Mar 6, 2025

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 Mar 6, 2025

size-limit report 📦

Path Size
JS 402.15 KB (+0.79% 🔺)
JS (gzip) 122.17 KB (+0.95% 🔺)
JS (brotli) 100.42 KB (+0.93% 🔺)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 348.95 KB (0%)
CSS (gzip) 43.23 KB (0%)
CSS (brotli) 34.47 KB (0%)

Copy link
Contributor
github-actions bot commented Mar 6, 2025

e2e tests

Playwright Report

Copy link
Contributor
github-actions bot commented Mar 6, 2025

👀 Docs deployed

Commit 7333f08

Copy link
codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.41%. Comparing base (de20a81) to head (d3bace0).
Report is 32 commits behind head on master.

Files with missing lines Patch % Lines
packages/vkui/src/lib/date.ts 83.33% 2 Missing ⚠️
...ckages/vkui/src/components/DateInput/DateInput.tsx 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8331      +/-   ##
==========================================
- Coverage   95.46%   95.41%   -0.05%     
==========================================
  Files         406      407       +1     
  Lines       11610    11581      -29     
  Branches     3844     3821      -23     
==========================================
- Hits        11083    11050      -33     
- Misses        527      531       +4     
Flag Coverage Δ
unittests 95.41% <92.10%> (-0.05%) ⬇️

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EldarMuhamethanov EldarMuhamethanov marked this pull request as draft March 6, 2025 09:07
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.

Вижу, что ещё draft, так что просто вопросик!

Классно, что так быстро взялся!

@vkcom-publisher vkcom-publisher added pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности and removed pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности labels Mar 14, 2025
# Conflicts:
#	packages/vkui/src/components/Calendar/Calendar.stories.tsx
#	yarn.lock
@EldarMuhamethanov EldarMuhamethanov marked this pull request as ready for review March 18, 2025 09:06
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.

💅

# Conflicts:
#	packages/vkui/src/components/Calendar/Calendar.tsx
#	packages/vkui/src/components/DateInput/DateInput.tsx
@andrey-medvedev-vk andrey-medvedev-vk requested a review from a team March 18, 2025 14:11
@EldarMuhamethanov EldarMuhamethanov merged commit 77a21bb into master Mar 19, 2025
27 checks passed
@EldarMuhamethanov EldarMuhamethanov modified the milestone: v7.2.0 Mar 19, 2025
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.

[Feature]: DateInput/DateRangeInput/Calendar дать возможность выводить дату в желаемой временной зоне
4 participants
0