Skip to content

feat(DateInput): add placeholder prop #8168

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 10 commits into from
Jan 28, 2025

Conversation

EldarMuhamethanov
Copy link
Contributor

@EldarMuhamethanov EldarMuhamethanov commented Jan 20, 2025


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

Описание

Нужно добавить отображение placeholder - текст, который будет отображаться при пустом значении value

Изменения

  • Добавил свойство renderCustomValue, которое позволяет отрендерить кастомный текст в зависимости от значения в поле
  • Добавил скришоты, тесты нового функционала

Release notes

Улучшения

  • DateInput: добавлено свойство renderCustomValue, которое позволяет отрендерить кастомный текст в зависимости от значения в поле

@EldarMuhamethanov EldarMuhamethanov requested a review from a team January 20, 2025 08:58
@EldarMuhamethanov EldarMuhamethanov requested a review from a team as a code owner January 20, 2025 08:58
Copy link

codesandbox-ci bot commented Jan 20, 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 Jan 20, 2025

size-limit report 📦

Path Size
JS 393.49 KB (+0.09% 🔺)
JS (gzip) 119.31 KB (+0.06% 🔺)
JS (brotli) 98.11 KB (+0.07% 🔺)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 345.42 KB (+0.26% 🔺)
CSS (gzip) 42.83 KB (+0.29% 🔺)
CSS (brotli) 34.15 KB (+0.4% 🔺)

Copy link
Contributor

github-actions bot commented Jan 20, 2025

e2e tests

Playwright Report

Copy link
Contributor

github-actions bot commented Jan 20, 2025

👀 Docs deployed

Commit beee192

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.50%. Comparing base (7a953d8) to head (beee192).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8168      +/-   ##
==========================================
+ Coverage   95.49%   95.50%   +0.01%     
==========================================
  Files         403      403              
  Lines       11503    11507       +4     
  Branches     3812     3815       +3     
==========================================
+ Hits        10985    10990       +5     
+ Misses        518      517       -1     
Flag Coverage Δ
unittests 95.50% <100.00%> (+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.

# Conflicts:
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-android-chromium-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-android-chromium-light-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-ios-webkit-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-ios-webkit-light-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-chromium-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-chromium-light-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-firefox-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-firefox-light-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-webkit-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-webkit-light-1-snap.png
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.

👏 👏 👏

qurle
qurle previously approved these changes Jan 27, 2025
# Conflicts:
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-android-chromium-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-android-chromium-light-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-chromium-dark-1-snap.png
#	packages/vkui/src/components/DateInput/__image_snapshots__/dateinput-vkcom-chromium-light-1-snap.png
…/date-input-placeholder

# Conflicts:
#	packages/vkui/src/components/DateInput/DateInput.test.tsx
inomdzhon
inomdzhon previously approved these changes Jan 28, 2025
@EldarMuhamethanov EldarMuhamethanov merged commit 61f0d9f into master Jan 28, 2025
29 checks passed
@EldarMuhamethanov EldarMuhamethanov deleted the e.muhamethanov/6040/date-input-placeholder branch January 28, 2025 10:30
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
4 participants