Skip to content

[カレンダー]開始日時・終了日時の初期値を利用しやすい時刻にしました #2011

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 4 commits into from
May 28, 2024

Conversation

gakigaki
Copy link
Contributor

@gakigaki gakigaki commented May 14, 2024

概要

変更内容

予定を新規で登録する際、開始日時・終了日時の初期値を以下のように変更します。

変更前

  • 開始日時:空白(テキストボックスを選択すると現在時刻が選ばれる)
  • 終了日時:空白(テキストボックスを選択すると現在時刻が選ばれる)

変更後

  • 当日の予定

    • 開始日時:現在時刻から1時間後の00分
    • 終了日時:現在時刻から2時間後の00分
  • 当日以外の予定

    • 開始日時:09:00
    • 終了日時:10:00

例えば、現在時刻が18:15の場合、以下のようになります。
開始日時 ⇒ 19:00
終了日時 ⇒ 20:00

背景や目的

  • カレンダーの予定には00分以外の分(12分など1分単位の値)を入力することが少ない
  • 現在時刻の予定を入力することは少ない

レビュー完了希望日

関連Pull requests/Issues

参考

DB変更の有無

無し

チェックリスト

gakigaki added 4 commits May 13, 2024 05:40
現在時刻から切りのいい時刻にする。00分以外はあまり入力することがない。
当日なら現在時刻付近、当日以外なら9:00-10:00
@gakigaki gakigaki added enhancement 機能強化 plugin(calendar) カレンダー labels May 14, 2024
@gakigaki gakigaki marked this pull request as ready for review May 14, 2024 09:26
@gakigaki
Copy link
Contributor Author

@masaton0216
コーディングに問題ないかレビューをお願いします。

@osws-makino
変更内容に問題がないかレビューをお願いします。

Copy link
Contributor

@masaton0216 masaton0216 left a comment

Choose a reason for hiding this comment

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

LGTMです。

余談ですが、moment.jsって非推奨になって久しいのね。
https://momentjs.com/docs/
※本家が代替ライブラリ(day.jsとかdate-fns等)まで提示してました。

moment.js重いってのはしばしば聞く話なのt、加えて非推奨であらば、どこか(パフォーマンス目線でのバンドルjsのダイエット等々)で乗り換え検討してもいいかもしれないね。

@gakigaki
Copy link
Contributor Author

datepickerがmoment.jsに依存してるので乗り換えが結構大変なんですよね……。

@gakigaki
Copy link
Contributor Author

より使いやすくするため、初期値を当日か当日以外かで分けるようにしました。

  • 当日の予定
    • 開始日時:現在時刻から1時間後の00分
    • 終了日時:現在時刻から2時間後の00分
  • 当日以外の予定
    • 開始日時:09:00
    • 終了日時:10:00

@osws-makino osws-makino merged commit 90235e7 into master May 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 機能強化 plugin(calendar) カレンダー
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants