fix: align desktop habit detail with task pane
This commit is contained in:
@@ -9,6 +9,7 @@ const countdownPanel = readFileSync('src/CountdownPanel.vue', 'utf8')
|
||||
const floatingAdd = readFileSync('src/components/FloatingAddButton.vue', 'utf8')
|
||||
const completedFilterPill = readFileSync('src/components/CompletedFilterPill.vue', 'utf8')
|
||||
const taskDueDisplay = readFileSync('src/components/TaskDueDisplay.vue', 'utf8')
|
||||
const appSheet = readFileSync('src/components/AppSheet.vue', 'utf8')
|
||||
|
||||
describe('unified task due display', () => {
|
||||
it('uses the shared display for overdue and ordinary parent task rows', () => {
|
||||
@@ -1463,17 +1464,29 @@ describe('unified floating add interaction', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('desktop task detail disclosure', () => {
|
||||
it('gives the task list the full remaining width until a task is selected', () => {
|
||||
expect(app).toContain("'detail-open': Boolean(selectedTask)")
|
||||
describe('desktop task and habit detail disclosure', () => {
|
||||
it('gives the list the full remaining width until a task or habit is selected', () => {
|
||||
expect(app).toContain("'detail-open': Boolean(selectedTask) || habitDetailOpen")
|
||||
expect(app).toContain('<AppSheet v-if="selectedTask" :open="true" :modal="compactLayout"')
|
||||
expect(app).toContain('panel-class="detail"')
|
||||
expect(app).toContain(':compact-layout="compactLayout"')
|
||||
expect(app).toContain('@detail="handleHabitDetail"')
|
||||
expect(app).toContain('function handleHabitDetail(open: boolean)')
|
||||
expect(app).toContain('if (open) closeTaskDetail()')
|
||||
expect(app).toContain('habitComposer.value?.closeHabitDetail(true)')
|
||||
expect(mvpPanel).toContain('function closeHabitDetail(force = false)')
|
||||
expect(mvpPanel).toContain('if (busy.value && !force) return')
|
||||
expect(mvpPanel).toContain(':modal="compactLayout"')
|
||||
expect(mvpPanel).toContain('inline-target=".shell"')
|
||||
expect(appSheet).toContain('<Teleport v-else-if="inlineTarget" :to="inlineTarget">')
|
||||
expect(mvpPanel).toContain("watch(selectedHabit, (habit) => emit('detail', Boolean(habit)))")
|
||||
expect(app).toContain('@click="closeTaskDetail"')
|
||||
expect(app).toContain('function closeTaskDetail()')
|
||||
expect(app).not.toContain('<div v-else class="paper">')
|
||||
expect(css).toContain('.shell{height:100vh;display:grid;grid-template-columns:236px minmax(430px,1fr) 0;')
|
||||
expect(css).toContain('.shell.detail-open{grid-template-columns:236px minmax(430px,1fr) 350px}')
|
||||
expect(css).toContain('.shell.sidebar-collapsed.detail-open{grid-template-columns:0 minmax(430px,1fr) 350px}')
|
||||
expect(css).toContain('@media(min-width:931px){.habit-detail-sheet{width:350px;height:100vh;max-height:none;border-radius:0;')
|
||||
expect(css).toContain('transition:grid-template-columns .22s ease')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user