fix(desktop): TODO/Schedule ダイアログ横幅を !important で確実に広げる (再対応 #238)#255
Conversation
PR #242 で `sm:max-w-xl` / `sm:max-w-5xl` による上書きを入れたが、 ユーザー環境で依然として `sm:max-w-lg` (512px) に絞られる症状が残って いた。コードベースの他の広幅ダイアログ (DockerView / DatabasesView / TeardownLogsDialog) は一様に `!max-w-...` の important パターンを 使っているので、それに倣って確実にベースの `sm:max-w-lg` を上書きする。 - TodoModal: `!max-w-[min(640px,calc(100vw-2rem))]` (~640px) - ScheduleEditorDialog: `!w-[min(1280px,92vw)] !max-w-[min(1280px,92vw)]` (~1280px) - どちらも `sm:!max-w-...` も併記し、@media 由来の順序問題を完全に排除 - `min()` で狭いビューポートにも対応 Closes #238
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthroughウォークスルー2つのダイアログコンポーネントのスタイリングを更新しました。固定幅制約である 変更内容
推定コードレビュー工数🎯 1 (Trivial) | ⏱️ ~3 分 うさぎからのお詩
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
概要
Issue #238 は PR #242 でクラスを
sm:max-w-xl/sm:max-w-5xlに差し替えたが、ユーザー報告によるとビルド後も依然として狭いままだった(sm:max-w-lg相当の 512px)。原因の仮説
packages/uiのDialogContentの base className にはsm:max-w-lgが入っている。twMerge は理屈上これを剥がせるはずなのに、ビルド済み CSS のルール順でsm:max-w-5xlがsm:max-w-lgより 前 に配置されるため、@media の specificity 引き分けが発生した場合にlgが勝ってしまう余地がある。実際、リポジトリの他の広幅ダイアログ(
DockerView/DatabasesView/TeardownLogsDialog)は揃って!max-w-...の important パターンを採用している。変更点
TodoModalmax-w-xl sm:max-w-xl rounded-xl!max-w-[min(640px,calc(100vw-2rem))] sm:!max-w-[min(640px,calc(100vw-2rem))] rounded-xlScheduleEditorDialogmax-w-5xl sm:max-w-5xl w-[92vw] ...!w-[min(1280px,92vw)] !max-w-[min(1280px,92vw)] sm:!max-w-[min(1280px,92vw)] max-h-[90vh] overflow-y-auto!(important) でベースのsm:max-w-lgを確実に勝ち切るmin(固定幅, vw)で画面が狭い時はビューポート基準で縮むsm:!max-w-...も併記して @media 由来の順序問題を完全に排除Test plan
min()で画面内に収まることCloses #238
Summary by CodeRabbit