Component: Relative Time
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, tailwindcss, typescript
調査の方向性
Read the existing components under src/registry/components/, then check their exports in src/registry/components/index.ts and entries in src/registry/registry.ts. Build the Relative Time component around the listed API and timing requirements, and add tests in test/ for past and future dates, unit selection, locales, and timer cleanup. It is done when the component, registry entry, tests, and a page in content/docs/components/ are complete.
索引モデルが issue の本文から書いたものです。
説明
Component: Relative Time
Show how long ago (or until) a date is, in the user's language: "3 minutes ago", "vor 3 Minuten", "in 2 days".
A first version was removed in #66 until it could be a real component. This issue is for doing it properly.
Requirements
- TypeScript-first with exported props interface
- Uses
Intl.RelativeTimeFormat, picking the largest sensible unit (seconds → minutes → hours → days → weeks → months → years) numeric="auto"by default, so you get "yesterday" / "gestern" rather than "1 day ago"- Renders a semantic
<time dateTime="…">with the absolute date as atitle - Updates itself while on screen, at a rate that fits the distance (every second near "now", every minute after that, …), and stops when unmounted
nowprop for tests and SSR, so the server and client render the same text- Forwarded ref and
...restlike the other components - Tailwind CSS compatible
Expected API
<RelativeTime date={comment.createdAt} locale="de" />
// → <time dateTime="2026-10-28T10:00:00.000Z" title="28. Oktober 2026, 11:00">vor 3 Minuten</time>
Deliverables
- Component source in
src/registry/components/ - Export in
src/registry/components/index.tsand entry insrc/registry/registry.ts - Tests in
test/covering past and future dates, unit selection,numeric="auto", at leasten,deandar, and that the timer is cleared on unmount - Documentation page in
content/docs/components/
See CONTRIBUTING.md and the Contributor Rulebook.
- 主要言語
- TypeScript
- スター
- 39
- フォーク
- 16
- 平均マージ
- 18時間 14分
- マージ済み PR(30日)
- 35
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
babelize/babelize-elements のほかの issue
-
accessibility help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
babelize/babelize-elements#94 ·
メンテナーはふだん 1 日以内に返信
-
component help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
babelize/babelize-elements#93 ·
メンテナーはふだん 1 日以内に返信
-
component date-time good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
babelize/babelize-elements#91 ·
メンテナーはふだん 1 日以内に返信
-
component good first issue language-switcher
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
babelize/babelize-elements#90 ·
メンテナーはふだん 1 日以内に返信
-
component enhancement help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
babelize/babelize-elements#47 ·
メンテナーはふだん 1 日以内に返信
babelize/babelize-elements の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
calagopus/panel#285 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
adobe/react-spectrum#10909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Run the dependency drift check対応中かも @spaceninja が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cloudfour/lighthouse-parade#449 ·
メンテナーはふだん 1 日以内に返信