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:
@@ -469,17 +469,6 @@ export function ListView({
|
||||
) : null}
|
||||
</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">
|
||||
{COLUMNS.map((column) => {
|
||||
const totalCount = tasks.filter((t) => t.column === column).length;
|
||||
@@ -508,6 +497,16 @@ export function ListView({
|
||||
</div>
|
||||
|
||||
<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 ? (
|
||||
<div className="list-empty">
|
||||
{filter ? "No tasks match your filter" : "No tasks yet"}
|
||||
|
||||
@@ -1332,18 +1332,21 @@ describe("ListView Quick Entry", () => {
|
||||
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);
|
||||
renderListView({ onQuickCreate: mockOnQuickCreate });
|
||||
|
||||
const quickEntry = screen.getByTestId("quick-entry-box");
|
||||
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
|
||||
expect(toolbar?.contains(quickEntry)).toBe(false);
|
||||
// QuickEntryBox should be inside create-area
|
||||
expect(createArea?.contains(quickEntry)).toBe(true);
|
||||
// QuickEntryBox should be inside the new quick-entry area
|
||||
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 () => {
|
||||
|
||||
@@ -3527,6 +3527,19 @@ body {
|
||||
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 {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
|
||||
Reference in New Issue
Block a user