Skip to content

Feat/calender card style - #281

Open
konryu-kin wants to merge 3 commits into
feat/pagesfrom
feat/calenderCardStyle
Open

konryu-kin wants to merge 3 commits into
feat/pagesfrom
feat/calenderCardStyle

Conversation

@konryu-kin

@konryu-kin konryu-kin commented Nov 4, 2026 •

Copy link
Copy Markdown

以下のような表示になるよう実装しました
image
カードの中身も変えたかったのですが、RoomBlock.vueのsegmentsあたりがよく分からず、できませんでした。
同じカードに複数イベントの情報が入ることがある?んですかね
あと表示がおかしいので(前から?)↑と合わせて直す必要がありそうです

#255

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d68cbbfe-a84a-46f8-9068-ba23532cfc39

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

@mathsuky
mathsuky self-requested a review November 11, 2026 08:00

@mathsuky mathsuky left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ありがとうございます!全体的に良くできていると思います.

ニッチなケースについて表示が崩れるのですが,全部にうまく対応することは難しいと思うので,コメント内容を試してうまくいかないようであれば教えてください.

カードの中身も変えたかったのですが、RoomBlock.vueのsegmentsあたりがよく分からず、できませんでした。

segments (line 39)は,各イベントをカード内に描くための表示データです.1イベントにつき1つ作り,次を計算しています.

  • top:部屋の開始時刻から,どれだけ下に置くか.
  • height:イベントの長さに応じた表示の高さ.
  • lane / lanes:時間が重なるイベントを横に並べる位置と分割数.
  • exclusive:部屋を共有できるかによる色分け.

ちょっと具体的な困りごとが分からなかったので,上記説明でわからないところを改めて教えて欲しいです!

表示がおかしいので

これはどういうことかイメージできなかったので,おかしな表示のスクリーンショットと再現手順を教えていただきたいです:bow-nya:

Comment on lines +104 to +107
if (recentOverlaps.length === 0) {
layout.zIndex =
Math.max(...overlapsInCalendar().map((previous) => previous.zIndex)) +
1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aが9:00–13:00で内部に11:00–12:00のイベントを持ち,Bが10:00–13:00の場合,BがAの上に重なります.イベント名はRoomBlock内の該当時間帯に表示されるため,Bに覆われて読めなくなります.

うまく表示順序を変えるロジックを思いつかないので,対応が厳しそうであれば,

  • イベントの枠は色だけつける
  • イベントの名前はクリックした後に見えるようにする

にするのはどうでしょうか?

Comment on lines +117 to +121
const higherLaneOverlaps = out.filter(
(previous) =>
previous.left > layout.left &&
startOf(item) - startOf(previous) >= STACKING_START_THRESHOLD_MINUTES &&
overlapsInTime(previous)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aを9:30–10:00,Bを9:55–11:00,Cを10:00–12:00とすると,Bは右列,Cは全幅になります.この条件が開始時刻差40分未満のBを除外するためです.同じzIndexのCが後から描画され,Bの部屋名とほぼ全体を覆います.

幅がsplitされているイベントについてはz-indexを優先する(上にくるようにする)のはどうでしょうか.なぜなら,splitされているイベントはそれより幅が大きいイベントの表示を邪魔しないからです.

このようなケースが起きることは稀なので,もし上記の変更が他の表示を破壊するようであれば対応しなくて良いです.

Comment on lines +31 to +41
it('stacks overlapping items when the previous item started at least 20 minutes earlier', () => {
expect(
layout([
{ id: 'earlier', start: 540, end: 620 },
{ id: 'later', start: 560, end: 630 }
])
).toEqual([
{ id: 'earlier', start: 540, end: 620, left: 0, right: 1, zIndex: 1 },
{ id: 'later', start: 560, end: 630, left: 0, right: 1, zIndex: 2 }
])
})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

期待値が20のままなので,40に修正してください.

@mathsuky

Copy link
Copy Markdown
Collaborator

(一応僕が表示を確認するのに使った進捗部屋データを共有します)

Subject,Start date,End date,Start time,End time,Location
進捗部屋,2026/11/11,2026/11/11,09:00,10:00,R1-01
進捗部屋,2026/11/11,2026/11/11,09:40,10:40,R1-02
進捗部屋,2026/11/11,2026/11/11,10:20,11:20,R1-03
進捗部屋,2026/11/11,2026/11/11,11:00,12:00,R1-04
進捗部屋,2026/11/11,2026/11/11,11:40,12:40,R1-05
進捗部屋,2026/11/11,2026/11/11,12:20,13:20,R1-06
進捗部屋,2026/11/11,2026/11/11,13:00,14:00,R1-07
進捗部屋,2026/11/11,2026/11/11,13:40,14:40,R1-08
進捗部屋,2026/11/11,2026/11/11,14:20,15:20,R1-09
進捗部屋,2026/11/11,2026/11/11,15:00,16:00,R1-10
進捗部屋,2026/11/11,2026/11/11,15:40,16:40,R1-11
進捗部屋,2026/11/11,2026/11/11,16:20,17:20,R1-12
進捗部屋,2026/11/12,2026/11/12,09:30,10:00,R2-A
進捗部屋,2026/11/12,2026/11/12,09:55,11:00,R2-B
進捗部屋,2026/11/12,2026/11/12,10:00,12:00,R2-C
進捗部屋,2026/11/13,2026/11/13,09:00,13:00,R3-A
進捗部屋,2026/11/13,2026/11/13,10:00,13:00,R3-B

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.

2 participants