Skip to content

datetime属性の形式を統一#9717

Open
s-tone-gs wants to merge 11 commits intomainfrom
chore/inconsistent-datetime-format
Open

datetime属性の形式を統一#9717
s-tone-gs wants to merge 11 commits intomainfrom
chore/inconsistent-datetime-format

Conversation

@s-tone-gs
Copy link
Copy Markdown
Contributor

@s-tone-gs s-tone-gs commented Mar 3, 2026

Issue

概要

  • viewで用いられるdatetime属性の形式を、全ての箇所で明示的に記述するようにした。
  • datetime属性の値と画面表記の値が異なっている箇所を修正した。
  • datetime属性の無いtimeタグにdatetime属性を付与した。
  • timeタグ以外で日付を扱っていた部分をtimeタグに修正した。

変更確認方法

  1. chore/inconsistent-datetime-formatをローカルに取り込む
  2. 開発サーバーを起動する
  3. 以下のページ一覧にあるページにアクセスし、デベロッパーツールから次の二点を確認する
  • datetime属性の値がYYYY-MM-DDThh:mm:ss+09:00の形式であること
  • 次のスクリーンショットのように、画面表記の値とdatetime属性の値が一致していること
スクリーンショット 2026-03-09 105322

新たに付与したdatetime属性の確認

Screenshot

変更前

変更前

変更後

変更後1

Summary by CodeRabbit

  • リファクタリング
    • 各表示でHTMLのdatetime属性をISO 8601形式に統一しました(タイムスタンプ表現の一貫化)。
  • 変更(API)
    • 製品のシリアライズにトレーニング終了日時のISO8601フィールドを追加しました。

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

複数のビュー・コンポーネント・シリアライザで time 要素や JSON に出力する日時表現を ISO 8601(.iso8601 / _date_time フィールド)に統一する変更。表示文言や制御フローは概ね不変。

Changes

Cohort / File(s) Summary
Product UI & JS
app/components/products/product_component.html.slim, app/views/products/_product.html.slim, app/views/products/_product_header.html.slim, app/views/reports/_product.html.slim, app/views/users/_product.html.slim, app/javascript/components/Product.jsx
product 関連の time 要素で published_at/created_at/updated_at(および最後のコメント時刻/training_ends_on)を .iso8601 / _date_time に変更。JSX の dateTime バインドを更新。
Announcements & Home
app/views/announcements/_announcement.html.slim, app/views/announcements/show.html.slim, app/views/home/_announcement.html.slim, app/views/users/announcements/_wip_announcements.html.slim
announcement の published_at/updated_at.iso8601 に変更。
Events & Regular Events
app/views/events/_event.html.slim, app/views/events/_events.html.slim, app/views/users/events/_wip_events.html.slim, app/views/users/events/index.html.slim, app/views/regular_events/_regular_event.html.slim
イベント関連の created_at/updated_at/start_at.iso8601 に変更。
Pages / Questions
app/views/questions/_question_header.html.slim, app/views/pages/_doc_header.html.slim, app/views/users/pages/_wip_pages.html.slim, app/views/users/questions/_wip_questions.html.slim
質問・ページの published_at/updated_at.iso8601 に変更。
Reports & Coding Tests
app/views/reports/_report.html.slim, app/views/coding_tests/coding_test_submissions/_coding_test_submission.html.slim, app/views/coding_tests/coding_test_submissions/show.html.slim, app/views/users/_reports.html.slim, app/views/users/reports/_wip_reports.html.slim
レポート/コーディングテストの datetime を .iso8601 に変更。_report.html.slim ではコメント/チェック表示の条件が除去され常時レンダリングになっている差分あり。
User / Notifications / Watch / Bookmarks
app/views/users/comments/_comment.html.slim, app/views/users/products/_wip_products.html.slim, app/views/notifications/_notification.html.slim, app/views/current_user/bookmarks/_list.html.slim, app/views/watches/_watch.html.slim
ユーザー関連の time 要素を .iso8601 / in_time_zone.iso8601 に統一(表示ラベルは既存のまま)。
Other templates
app/views/movies/_movie_header.html.slim, app/views/works/show.html.slim, app/views/home/_colleague_trainee_recent_report.html.slim, app/views/users/events/_wip_events.html.slim
その他テンプレートでも to_datetime / 直接参照から .iso8601 へ変更。
API JSON
app/views/api/products/_product.json.jbuilder
product.user に training_ends_on_date_time(ISO8601)を追加。API レスポンスのスキーマが拡張される。

Sequence Diagram(s)

(該当なし)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • komagata

Poem

🐰🌿 ISO の時間を揃えたよ、ぴょん、
テンプレの森に光が差す、ぴょん、
小さな変更で波紋をひろげ、
タグは整い、心はほっこり、
うさぎが祝う、ささやかな整備。

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトル「datetime属性の形式を統一」は、変更セット全体の主な目的を明確かつ簡潔に要約している。複数のビューファイルおよびコンポーネント内のdatetime属性を一貫した形式(ISO8601)に統一する変更を適切に表現している。
Description check ✅ Passed PRの説明は日本語テンプレートに沿い、Issue番号、概要、変更確認方法、スクリーンショットが記載されており、ほぼ完全です。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/inconsistent-datetime-format

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

| お知らせ作成中
- else
time.a-meta(datetime='announcement.published_at_date_time')
time.a-meta(datetime="#{announcement.published_at.iso8601}")
Copy link
Copy Markdown
Contributor Author

@s-tone-gs s-tone-gs Mar 3, 2026

Choose a reason for hiding this comment

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

datetime属性に文字列が渡されていたので同時に修正した。

.page-content-header__row
.page-content-header__before-title
time.a-meta(datetime="#{@announcement.created_at.to_datetime}" pubdate='pubdate')
time.a-meta(datetime="#{@announcement.created_at.iso8601}" pubdate='pubdate')
Copy link
Copy Markdown
Contributor Author

@s-tone-gs s-tone-gs Mar 3, 2026

Choose a reason for hiding this comment

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

created_atなどはdatetime型のフィールドなので、to_datetimeは不要な処理なのでは?と考えている。
to_datetimeが必要な理由が見つけられなかったので一旦消した。もし必要性を知っていたら教えていただきたい
他にも同様の修正を掛けた場所が複数ある

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

s-tone-gs commented Mar 3, 2026

メモ:
app/views/welcome/training.html.slimに time(datetime="P1M")というような形式でdatetime属性が設定されている場所がある。これはISO 8601に則った記述であったのでそのままにしてある
ref: https://ja.wikipedia.org/wiki/ISO_8601#%E7%B6%99%E7%B6%9A%E6%99%82%E9%96%93

@s-tone-gs

This comment was marked as resolved.

@machida

This comment was marked as resolved.

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from ddaa008 to fe5f29d Compare March 4, 2026 09:23
@s-tone-gs s-tone-gs self-assigned this Mar 5, 2026
@s-tone-gs s-tone-gs marked this pull request as ready for review March 5, 2026 01:31
@github-actions github-actions bot requested a review from komagata March 5, 2026 01:32
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (1)
app/views/events/_events.html.slim (1)

29-31: 変更は妥当です。加えて、日時属性の自動検証を1本追加するのを推奨します。

この変更自体は問題ありません。今回のような横断修正の再発防止として、代表ビューに time[datetime] のフォーマットを確認する view/system spec を1つ置くと、手動確認の負担を下げられます。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/events/_events.html.slim` around lines 29 - 31, Add a view/system
spec that automatically verifies the time[datetime] attribute uses ISO8601 so
regressions like the one in the events partial are caught; target the rendered
partial containing the time.a-meta(datetime=event.start_at.iso8601) (or a
representative events view) and assert that the time element's datetime
attribute matches an ISO8601 timestamp (use a regex or DateTime.parse in the
test) and that the visible text still uses the localized l(event.start_at)
formatting; place the test as a lightweight view spec (e.g.,
spec/views/events/_events_spec.rb) or a small system spec (e.g.,
spec/system/event_view_spec.rb) depending on existing test conventions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/javascript/components/BookmarksInDashboard.jsx`:
- Around line 157-159: In BookmarksInDashboard.jsx the code uses
bookmark.updated_at.iso8601 which is undefined because the API already returns
updated_at as an ISO8601 string; change usages of bookmark.updated_at.iso8601
(e.g. in the <time dateTime={...}> and any other references) to use
bookmark.updated_at directly so the ISO8601 string from the API is passed
through (update the dateTime prop and any displayed value accordingly).

In `@app/javascript/components/Events.jsx`:
- Line 107: In Events.jsx, fix the time element to use the ISO8601 string
directly by replacing any usage of event.start_at.iso8601 with event.start_at
(e.g., update the <time className="a-meta" dateTime={...}> to use
event.start_at); additionally implement the missing /api/events endpoint so the
frontend receives events as JSON with start_at as an ISO8601 string (ensure the
controller/action or route that serves /api/events returns an array of events
including start_at strings).

In `@app/javascript/components/Product.jsx`:
- Around line 157-163: The time elements in Product.jsx are using
product.created_at.iso8601 and product.updated_at.iso8601 which are undefined
because the API returns formatted strings; update Product.jsx to use the
machine-readable fields product.created_at_date_time and
product.updated_at_date_time for the dateTime attributes (and likewise switch
any other .iso8601 uses, e.g. at line 276); on the API side add
training_ends_on_date_time to app/views/api/products/_product.json.jbuilder
(e.g. output product.user.training_ends_on.to_datetime when training_ends_on
exists) and then use product.user.training_ends_on_date_time in the front-end
where training_ends_on is rendered.

In `@app/javascript/components/RegularEvent.jsx`:
- Line 113: The time element in RegularEvent.jsx is accessing
event.start_at.iso8601 which is undefined because the API already returns
start_at as an ISO8601 string; update the component to use event.start_at
directly for both the dateTime prop and displayed time (replace references to
event.start_at.iso8601 with event.start_at) so the <time> element and any
parsing logic consume the string the API provides (check usages in
RegularEvent.jsx around the <time className="a-meta" ...> and any related
rendering/formatting functions).

In `@app/views/events/_event.html.slim`:
- Around line 25-26: datetime 属性に created_at を使っているため表示の updated_at
と不一致になっています。time.a-meta__value 要素の datetime を event.updated_at
に合わせて修正し、datetime="#{event.updated_at.iso8601}" として表示日時と参照元が一致するようにしてください(要素:
time.a-meta__value、参照フィールド: event.updated_at)。

In `@app/views/home/_colleague_trainee_recent_report.html.slim`:
- Line 19: Replace the use of Date#to_time when rendering the datetime attribute
so the app respects Rails time_zone: change the time tag building code that uses
report.reported_on.to_time (the time.a-meta(datetime=...) expression) to use
report.reported_on.in_time_zone.iso8601 instead; also apply the same fix to the
other occurrences that convert Date to time (the similar uses in the report
partial and bookmarks list) so all datetime attributes are generated with
in_time_zone.iso8601.

In `@app/views/products/_product.html.slim`:
- Around line 62-63: datetime属性に使用している時刻が表示と不一致です: time.a-meta の datetime に
product.commented_users.last.created_at.iso8601 を使っていますが表示は
product.comments.last.created_at を使っています。time.a-meta の datetime を
product.comments.last.created_at.iso8601 に切り替えて、time
要素の機械可読な時刻と画面表示(product.comments.last.created_at)を一致させてください(または表示側を
commented_users に合わせる場合は product.comments.last.created_at を
product.commented_users.last.created_at に統一してください)。

In `@app/views/regular_events/_regular_event.html.slim`:
- Around line 23-24: The time element in the partial _regular_event.html.slim
uses regular_event.created_at for the datetime attribute while rendering
regular_event.updated_at as the visible text; update the datetime attribute to
use regular_event.updated_at.iso8601 so the machine-readable datetime (datetime
attr) matches the displayed timestamp (regular_event.updated_at) in the time
element.

---

Nitpick comments:
In `@app/views/events/_events.html.slim`:
- Around line 29-31: Add a view/system spec that automatically verifies the
time[datetime] attribute uses ISO8601 so regressions like the one in the events
partial are caught; target the rendered partial containing the
time.a-meta(datetime=event.start_at.iso8601) (or a representative events view)
and assert that the time element's datetime attribute matches an ISO8601
timestamp (use a regex or DateTime.parse in the test) and that the visible text
still uses the localized l(event.start_at) formatting; place the test as a
lightweight view spec (e.g., spec/views/events/_events_spec.rb) or a small
system spec (e.g., spec/system/event_view_spec.rb) depending on existing test
conventions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12331653-9bcf-4825-97e8-2e494d8a6001

📥 Commits

Reviewing files that changed from the base of the PR and between 29d67c0 and fe5f29d.

📒 Files selected for processing (36)
  • app/components/products/product_component.html.slim
  • app/components/users/users_answer_component.html.slim
  • app/javascript/components/BookmarksInDashboard.jsx
  • app/javascript/components/Events.jsx
  • app/javascript/components/Product.jsx
  • app/javascript/components/RegularEvent.jsx
  • app/views/announcements/_announcement.html.slim
  • app/views/announcements/show.html.slim
  • app/views/coding_tests/coding_test_submissions/_coding_test_submission.html.slim
  • app/views/coding_tests/coding_test_submissions/show.html.slim
  • app/views/current_user/bookmarks/_list.html.slim
  • app/views/events/_event.html.slim
  • app/views/events/_events.html.slim
  • app/views/home/_announcement.html.slim
  • app/views/home/_colleague_trainee_recent_report.html.slim
  • app/views/movies/_movie_header.html.slim
  • app/views/notifications/_notification.html.slim
  • app/views/pages/_doc_header.html.slim
  • app/views/products/_product.html.slim
  • app/views/products/_product_header.html.slim
  • app/views/questions/_question_header.html.slim
  • app/views/regular_events/_regular_event.html.slim
  • app/views/reports/_product.html.slim
  • app/views/reports/_report.html.slim
  • app/views/users/_product.html.slim
  • app/views/users/_reports.html.slim
  • app/views/users/announcements/_wip_announcements.html.slim
  • app/views/users/comments/_comment.html.slim
  • app/views/users/events/_wip_events.html.slim
  • app/views/users/events/index.html.slim
  • app/views/users/pages/_wip_pages.html.slim
  • app/views/users/products/_wip_products.html.slim
  • app/views/users/questions/_wip_questions.html.slim
  • app/views/users/reports/_wip_reports.html.slim
  • app/views/watches/_watch.html.slim
  • app/views/works/show.html.slim

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from fe5f29d to 5a178d0 Compare March 5, 2026 02:37
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/views/users/comments/_comment.html.slim`:
- Around line 32-33: The datetime attribute and displayed time are inconsistent:
the time tag uses commentable.created_at for datetime but renders
comment.updated_at; change one so both match—preferably update the datetime
attribute to use comment.updated_at.iso8601 (or alternatively render
commentable.created_at) so the time.a-meta element’s datetime value and the
visible timestamp (comment.updated_at) are aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30114772-08f2-4b34-8782-5540561faf8a

📥 Commits

Reviewing files that changed from the base of the PR and between fe5f29d and 5a178d0.

📒 Files selected for processing (33)
  • app/components/products/product_component.html.slim
  • app/components/users/users_answer_component.html.slim
  • app/javascript/components/Product.jsx
  • app/views/announcements/_announcement.html.slim
  • app/views/announcements/show.html.slim
  • app/views/coding_tests/coding_test_submissions/_coding_test_submission.html.slim
  • app/views/coding_tests/coding_test_submissions/show.html.slim
  • app/views/current_user/bookmarks/_list.html.slim
  • app/views/events/_event.html.slim
  • app/views/events/_events.html.slim
  • app/views/home/_announcement.html.slim
  • app/views/home/_colleague_trainee_recent_report.html.slim
  • app/views/movies/_movie_header.html.slim
  • app/views/notifications/_notification.html.slim
  • app/views/pages/_doc_header.html.slim
  • app/views/products/_product.html.slim
  • app/views/products/_product_header.html.slim
  • app/views/questions/_question_header.html.slim
  • app/views/regular_events/_regular_event.html.slim
  • app/views/reports/_product.html.slim
  • app/views/reports/_report.html.slim
  • app/views/users/_product.html.slim
  • app/views/users/_reports.html.slim
  • app/views/users/announcements/_wip_announcements.html.slim
  • app/views/users/comments/_comment.html.slim
  • app/views/users/events/_wip_events.html.slim
  • app/views/users/events/index.html.slim
  • app/views/users/pages/_wip_pages.html.slim
  • app/views/users/products/_wip_products.html.slim
  • app/views/users/questions/_wip_questions.html.slim
  • app/views/users/reports/_wip_reports.html.slim
  • app/views/watches/_watch.html.slim
  • app/views/works/show.html.slim
🚧 Files skipped from review as they are similar to previous changes (20)
  • app/views/coding_tests/coding_test_submissions/show.html.slim
  • app/views/regular_events/_regular_event.html.slim
  • app/views/users/reports/_wip_reports.html.slim
  • app/views/movies/_movie_header.html.slim
  • app/views/announcements/show.html.slim
  • app/views/reports/_product.html.slim
  • app/views/events/_event.html.slim
  • app/views/watches/_watch.html.slim
  • app/views/home/_colleague_trainee_recent_report.html.slim
  • app/views/users/events/_wip_events.html.slim
  • app/components/users/users_answer_component.html.slim
  • app/views/pages/_doc_header.html.slim
  • app/components/products/product_component.html.slim
  • app/views/coding_tests/coding_test_submissions/_coding_test_submission.html.slim
  • app/views/works/show.html.slim
  • app/views/questions/_question_header.html.slim
  • app/views/announcements/_announcement.html.slim
  • app/views/products/_product.html.slim
  • app/javascript/components/Product.jsx
  • app/views/home/_announcement.html.slim

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch 2 times, most recently from a6510fe to 7e80ca1 Compare March 9, 2026 00:45
coderabbitai[bot]

This comment was marked as resolved.

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from 7e80ca1 to 1a08af2 Compare March 9, 2026 01:27
@s-tone-gs

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as duplicate.

@s-tone-gs s-tone-gs requested a review from yokomaru March 9, 2026 02:15
@s-tone-gs
Copy link
Copy Markdown
Contributor Author

@yokomaru
お疲れ様です!
レビュー依頼させていただきました!
忙しくてレビューに1週間以上かかりそうな場合は別の方に依頼させていただこうかな、と考えているので教えていただけるとありがたいです!
よろしくお願いいたします

@yokomaru
Copy link
Copy Markdown
Contributor

yokomaru commented Mar 9, 2026

@s-tone-gs
お疲れ様です。承知いたしました。
数日〜1週間以内にレビューいたします(難しそうであれば早めにご連絡いたします)
よろしくお願いいたします。

@yokomaru
Copy link
Copy Markdown
Contributor

@s-tone-gs
お疲れ様です!土日稼働できず、本日AM中にレビューするのでもう少しお待ちください🙏

Copy link
Copy Markdown
Contributor

@yokomaru yokomaru left a comment

Choose a reason for hiding this comment

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

@s-tone-gs

お疲れ様です。お待たせいたしました。
in_time_zoneto_datetimeの違いなど非常に勉強になりました!
コメントいたしましたのでご確認お願いいたします。

検証はほぼ問題なかったのですが、検証項目について2点、対応箇所について1点確認させてください!

検証項目について

  • /users/:id
    Image

  • ユーザープロフィールの各WIPタブと書いている場所がわからなかったのですが、マイページではなくダッシュボードの以下の箇所であっていますでしょうか?

Image

※ タブというと以下のようなUIを想像するので、検証箇所はなるべく正確に記載いただくと伝わりやすいかな?と思いました!🙏
Image

  • ログインユーザー固有

Image

  • 同期の日報という項目が見当たらなかったのですが、最新のみんなの日報の箇所のことであっていますでしょうか?

Image

対応箇所について

  • time.a-metaでgrepしたところ、datetime属性がついてないtimeタグがいくつか発見いたしました👀
    • こちらはそのままでも問題ないでしょうか?(この属性の必須度がどのくらいか分からっておらず質問させていただきました!🙏)
    • 検討いただき不要or別のIssueでの対応の方が良いと判断されたらそれでも大丈夫です!
                time.a-meta
                  span.a-meta__label
                    | 提出
                  = l(@product.published_at)
datetime属性がついてないtimeタグについて
# git grep -n "time.a-meta" (vscodeで正規表現あり検索で`time.a-meta\n`の方がみやすいかもです)
app/components/products/product_component.html.slim:36:                time.a-meta
app/components/products/product_component.html.slim:42:                time.a-meta
app/components/products/product_component.html.slim:49:                time.a-meta
app/components/products/product_component.html.slim:55:              time.a-meta
app/components/products/product_component.html.slim:76:                time.a-meta
app/views/companies/products/_product.html.slim:28:                time.a-meta
app/views/companies/products/_product.html.slim:37:                time.a-meta
app/views/companies/products/_product.html.slim:46:                  time.a-meta
app/views/companies/products/_product.html.slim:74:                  time.a-meta
app/views/companies/products/_product.html.slim:83:                  time.a-meta
app/views/companies/products/_product.html.slim:92:                  time.a-meta
app/views/companies/products/_product.html.slim:101:                  time.a-meta
app/views/events/_upcoming_event.html.slim:29:                time.a-meta
app/views/external_entries/_external_entry.html.slim:18:              time.a-meta
app/views/home/_recent_report.html.slim:19:              time.a-meta
app/views/questions/_question.html.slim:39:                time.a-meta
app/views/questions/_question.html.slim:45:                time.a-meta
app/views/questions/_question_header.html.slim:45:              time.a-meta
app/views/users/_inactive_users.html.slim:21:                time.a-meta

.card-list-item-meta__items
.card-list-item-meta__item
time.a-meta dateTime=notification.created_at
time.a-meta dateTime=notification.created_at.iso8601
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

キャメルケースになっているのが気になりました!(非React化等を行なった際に残ったものだと推測しています)
この機に合わせて修正してしまっても良いのかな?と思いました💡

Suggested change
time.a-meta dateTime=notification.created_at.iso8601
time.a-meta datetime=notification.created_at.iso8601

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ありがとうございます~!見落としでした👀
キャメルケースを排除にて修正しました!

.card-list-item-meta__item
- if @product.user.training_ends_on
time.a-meta dateTime=@product.user.training_ends_on
time.a-meta dateTime=@product.user.training_ends_on.in_time_zone.iso8601
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

キャメルケースを排除で修正しました

class: 'a-user-name'
.card-list-item-meta__item
time.a-meta datetime=answer.updated_at pubdate="pubdate"
time.a-meta datetime=answer.updated_at.iso8601 pubdate="pubdate"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pubdate属性は現在廃止 されているらしく、過去のPRをいくつかみたところ削除対応をされているようです。

#2789 (comment)
#1587 (comment)

ざっとみた感じこの要素が残っている箇所が今回のPRでiso対応した箇所と一致しているようなので、このPRでついでに削除してもいいのかな?とおもいました!(検討いただき別のIssueでの対応の方が良いと判断されたらそれでも大丈夫です!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ありがとうございます~!把握していませんでした!対応箇所も一致していますし、過去のPRでも同時に修正されているので今回もこのPR内で削除しようと思います🫡

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pubdateを削除にて修正しました!

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

@yokomaru
レビューありがとうございます!
こちらの対応少し遅れそうです。来週中には対応いたします。申し訳ありません🙇‍♂️🙇‍♂️

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

@machida
お疲れ様です!
@yokomaru さん指摘いただいた箇所に加え、そもそもtimeタグ以外で日付を扱っている箇所も発見しました。こちらSEOやアクセシビリティの観点から修正した方が良いと考えています。datetime属性がついていないtimeタグにはdatetime属性を付与する、timeタグ以外で日付を扱っている箇所がtimeタグ+ datetime属性を使用する、という修正を今PR内で同時に行い、descriptionに追記しておこうかと考えています。
こちらの方向性で作業を進めてもよろしかったでしょうか??

ref: #9717 (review)

time.a-metaでgrepしたところ、datetime属性がついてないtimeタグがいくつか発見いたしました👀

ref: timeタグ以外で日付を扱っている箇所
image

@machida
Copy link
Copy Markdown
Member

machida commented Mar 27, 2026

@s-tone-gs 提案ありがとうございます!!ぜひ、お願いしたいです🙏

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

s-tone-gs commented Mar 27, 2026

@machida
承知しました!
@yokomaru さん、ご指摘ありがとうございます!

検証項目についての指摘もありがとうございます!

ユーザープロフィールの各WIPタブと書いている場所がわからなかったのですが、マイページではなくダッシュボードの以下の箇所であっていますでしょうか?

すみません、そもそもユーザープロフィールは現状の修正箇所外であり、検証項目には含まれないものでした💦
誤記載です申し訳ありません🙇‍♂️
#9717 (comment) で行う新しい修正では新たに検証個所として追加される予定です

同期の日報という項目が見当たらなかったのですが、最新のみんなの日報の箇所のことであっていますでしょうか?

こちらはに関してはそうです!

修正箇所が増える関係で検証項目をいじりますので、その際に同時に修正します🙇‍♂️曖昧な記述で混乱させてしまって申し訳ありません

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

s-tone-gs commented Mar 27, 2026

📝timeタグ以外で日付を扱っている部分

  • ユーザープロフィール
    app/views/users/_metas.html.slim

  • ダッシュボード
    app/views/events/_upcoming_event.html.slim

image
  • 質問詳細
    app/views/questions/_nav_questions.html.slim

  • Docs・動画
    app/views/pages/_page.html.slim

image
  • ペアワーク
    app/views/pair_works/_pair_work.html.slim
image
  • ポートフォリオ
    BEGIN app/components/works/work_component.html.slim
image

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from 4734e08 to 2e544ae Compare March 27, 2026 04:09
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

🚀 Review App

URL: https://bootcamp-pr-9717-fvlfu45apq-an.a.run.app

Basic認証: fjord / (ステージングと同じ)
PR更新時に自動で再デプロイされます。

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch 2 times, most recently from c3a41d9 to 4d3b156 Compare March 27, 2026 06:40

- if @display_until_next_elapsed_days && elapsed_days < @reply_deadline_days
time.a-meta
.a-meta
Copy link
Copy Markdown
Contributor Author

@s-tone-gs s-tone-gs Mar 27, 2026

Choose a reason for hiding this comment

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

「1時間未満」や「約○○時間」という曖昧な値は機械可読な形式で指定できないので、timeタグで扱うことをやめた。
ref: https://developer.mozilla.org/ja/docs/Web/HTML/Reference/Elements/time

@s-tone-gs
Copy link
Copy Markdown
Contributor Author

@yokomaru
お疲れ様です。こちら以下の対応により返信が遅れています。descriptionを更新後に改めてレビュー依頼させていただきます。お待たせして申し訳ありません

ref: #9717 (comment)

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch 2 times, most recently from fff0e2e to 08e7b62 Compare March 31, 2026 05:16
.a-meta
| 〜
time datetime=@product.comments.last.created_at.iso8601
= l @product.comments.last.created_at, format: :date_and_time
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

「〜(から)」という記号は時間情報ではないため「~」だけtimeタグの外に出した

@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from 08e7b62 to 8a99201 Compare March 31, 2026 05:24
@s-tone-gs s-tone-gs force-pushed the chore/inconsistent-datetime-format branch from 8a99201 to 4335246 Compare March 31, 2026 05:59
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.

3 participants