feat(KB-256): reposition QuickEntryBox above table headers in ListView

- Move QuickEntryBox from below headers to above the table in ListView
- Update CSS to support new positioning with sticky header layout
- Adjust ListView component structure for better visual hierarchy
- Update ListView tests to reflect new component ordering
This commit is contained in:
gsxdsm
2026-03-30 23:18:59 -07:00
parent f1997c0176
commit 1d1b2fa05f
4 changed files with 40 additions and 15 deletions

View File

@@ -0,0 +1,10 @@
---
"@dustinbyrne/kb": patch
---
Reposition QuickEntryBox in ListView to appear directly above table headers
The QuickEntryBox component has been moved from its previous position
(between the toolbar and column drop zones) to a new location directly
above the table headers. This creates a more logical visual flow:
toolbar → filters → drop zones → quick entry → table headers → task rows.

View File

@@ -469,17 +469,6 @@ export function ListView({
) : null} ) : null}
</div> </div>
<div className="list-create-area">
<QuickEntryBox
onCreate={onQuickCreate ?? (async () => addToast("Task creation not available", "error"))}
addToast={addToast}
tasks={tasks}
availableModels={availableModels}
onPlanningMode={onPlanningMode}
onSubtaskBreakdown={onSubtaskBreakdown}
/>
</div>
<div className="list-drop-zones"> <div className="list-drop-zones">
{COLUMNS.map((column) => { {COLUMNS.map((column) => {
const totalCount = tasks.filter((t) => t.column === column).length; const totalCount = tasks.filter((t) => t.column === column).length;
@@ -508,6 +497,16 @@ export function ListView({
</div> </div>
<div className="list-table-container"> <div className="list-table-container">
<div className="list-quick-entry-above-table">
<QuickEntryBox
onCreate={onQuickCreate ?? (async () => addToast("Task creation not available", "error"))}
addToast={addToast}
tasks={tasks}
availableModels={availableModels}
onPlanningMode={onPlanningMode}
onSubtaskBreakdown={onSubtaskBreakdown}
/>
</div>
{filteredCount === 0 ? ( {filteredCount === 0 ? (
<div className="list-empty"> <div className="list-empty">
{filter ? "No tasks match your filter" : "No tasks yet"} {filter ? "No tasks match your filter" : "No tasks yet"}

View File

@@ -1332,18 +1332,21 @@ describe("ListView Quick Entry", () => {
expect(input).toBeDefined(); expect(input).toBeDefined();
}); });
it("renders QuickEntryBox in list-create-area, not in toolbar", () => { it("renders QuickEntryBox in list-quick-entry-above-table, not in toolbar", () => {
const mockOnQuickCreate = vi.fn().mockResolvedValue(undefined); const mockOnQuickCreate = vi.fn().mockResolvedValue(undefined);
renderListView({ onQuickCreate: mockOnQuickCreate }); renderListView({ onQuickCreate: mockOnQuickCreate });
const quickEntry = screen.getByTestId("quick-entry-box"); const quickEntry = screen.getByTestId("quick-entry-box");
const toolbar = document.querySelector(".list-toolbar"); const toolbar = document.querySelector(".list-toolbar");
const createArea = document.querySelector(".list-create-area"); const quickEntryArea = document.querySelector(".list-quick-entry-above-table");
const tableContainer = document.querySelector(".list-table-container");
// QuickEntryBox should not be inside toolbar // QuickEntryBox should not be inside toolbar
expect(toolbar?.contains(quickEntry)).toBe(false); expect(toolbar?.contains(quickEntry)).toBe(false);
// QuickEntryBox should be inside create-area // QuickEntryBox should be inside the new quick-entry area
expect(createArea?.contains(quickEntry)).toBe(true); expect(quickEntryArea?.contains(quickEntry)).toBe(true);
// QuickEntryBox should be inside the table container (parent of quick-entry area)
expect(tableContainer?.contains(quickEntry)).toBe(true);
}); });
it("shows model selector button when QuickEntryBox is expanded", async () => { it("shows model selector button when QuickEntryBox is expanded", async () => {

View File

@@ -3527,6 +3527,19 @@ body {
margin: 0 auto; margin: 0 auto;
} }
/* New class for QuickEntryBox positioned above the table in list view */
.list-quick-entry-above-table {
width: 100%;
padding: var(--space-md) var(--space-xl);
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.list-quick-entry-above-table .quick-entry-box {
max-width: 800px;
margin: 0 auto;
}
.list-column-dropdown { .list-column-dropdown {
position: absolute; position: absolute;
top: 100%; top: 100%;