Skip to content

Commit a3d4e20

Browse files
Copilothotlong
andcommitted
refactor: extract getResponsiveTaskListWidth helper for GanttView task list width
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 19634b0 commit a3d4e20

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

ROADMAP.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ ObjectUI is a universal Server-Driven UI (SDUI) engine built on React + Tailwind
132132
- [x] i18n for all 11 locales (en, zh, ja, de, fr, es, ar, ru, pt, ko)
133133
- [ ] Conditional formatting rules
134134

135+
### P1.9 Console — Content Area Layout & Responsiveness
136+
137+
- [x] Add `min-w-0` / `overflow-hidden` to flex layout chain (SidebarInset → AppShell → ObjectView → PluginObjectView) to prevent content overflow
138+
- [x] Fix Gantt task list width — responsive sizing (120px mobile, 200px tablet, 300px desktop) instead of hardcoded 300px
139+
- [x] Fix Kanban board overflow containment (`min-w-0` on swimlane and flat containers)
140+
- [x] Fix Calendar header responsive wrapping and date label sizing
141+
- [x] Fix Map container overflow containment via `cn()` merge
142+
- [x] Fix Timeline container `min-w-0` to prevent overflow
143+
- [x] Fix ListView container `min-w-0 overflow-hidden` to prevent overflow
144+
- [ ] Mobile/tablet end-to-end testing for all view types
145+
- [ ] Dynamic width calculation for Gantt task list and Kanban columns based on container width
146+
135147
---
136148

137149
## 🧩 P2 — Polish & Advanced Features

packages/plugin-gantt/src/GanttView.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ function getResponsiveColumnWidth() {
3939
return 60;
4040
}
4141

42+
function getResponsiveTaskListWidth() {
43+
const w = typeof window !== 'undefined' ? window.innerWidth : 1024;
44+
if (w < 640) return 120;
45+
if (w < 1024) return 200;
46+
return 300;
47+
}
48+
4249
export interface GanttTask {
4350
id: string | number
4451
title: string
@@ -138,8 +145,7 @@ export function GanttView({
138145
return cols;
139146
}, [timelineRange]);
140147

141-
// Responsive task list width — narrower on small screens
142-
const taskListWidth = typeof window !== 'undefined' && window.innerWidth < 640 ? 120 : typeof window !== 'undefined' && window.innerWidth < 1024 ? 200 : 300;
148+
const taskListWidth = getResponsiveTaskListWidth();
143149

144150
const headerRef = React.useRef<HTMLDivElement>(null);
145151
const listRef = React.useRef<HTMLDivElement>(null);

0 commit comments

Comments
 (0)