From 85a9882d26fe8a8d8a017cee98a1a540fbbe43d5 Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Fri, 13 Mar 2026 01:22:28 +0800 Subject: [PATCH] Fix category chips appearing in wrong position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Category chips were rendering as a separate flex row that got pushed to the far right (between search and add button). Flatten the layout so chips appear inline immediately after the Categories toggle pill, separated by a divider. Remove redundant wrapper divs from TodosPage, PeoplePage, LocationsPage — CategoryFilterBar now owns its own flex-1 sizing. Co-Authored-By: Claude Opus 4.6 --- .../components/locations/LocationsPage.tsx | 28 ++-- frontend/src/components/people/PeoplePage.tsx | 42 +++-- .../components/shared/CategoryFilterBar.tsx | 145 +++++++++--------- frontend/src/components/todos/TodosPage.tsx | 28 ++-- 4 files changed, 116 insertions(+), 127 deletions(-) diff --git a/frontend/src/components/locations/LocationsPage.tsx b/frontend/src/components/locations/LocationsPage.tsx index 3174292..b52ba36 100644 --- a/frontend/src/components/locations/LocationsPage.tsx +++ b/frontend/src/components/locations/LocationsPage.tsx @@ -291,21 +291,19 @@ export default function LocationsPage() {

Locations

-
- setActiveFilters([])} - onTogglePinned={() => setShowPinned((v) => !v)} - onToggleCategory={handleToggleCategory} - onSelectAllCategories={selectAllCategories} - onReorderCategories={reorderCategories} - searchValue={search} - onSearchChange={setSearch} - /> -
+ setActiveFilters([])} + onTogglePinned={() => setShowPinned((v) => !v)} + onToggleCategory={handleToggleCategory} + onSelectAllCategories={selectAllCategories} + onReorderCategories={reorderCategories} + searchValue={search} + onSearchChange={setSearch} + /> + + {/* Pinned pill */} + + + {/* Extra pinned filters (e.g. "Umbral") */} + {extraPinnedFilters.map((epf) => ( + + ))} - {/* Pinned pill */} + {/* Categories pill */} + {categories.length > 0 && ( + )} - {/* Extra pinned filters (e.g. "Umbral") */} - {extraPinnedFilters.map((epf) => ( - - ))} - - {/* Categories pill */} - {categories.length > 0 && ( - - )} - - {/* Search */} -
-
- - onSearchChange(e.target.value)} - className="w-28 sm:w-52 h-8 pl-8 text-sm ring-inset" - aria-label="Search" - /> -
-
- - {/* Expanded categories row — shows below on mobile, inline on desktop */} + {/* Expanded category chips — inline after Categories pill */} {categories.length > 0 && otherOpen && ( -
- {/* "All" chip inside categories — non-draggable */} + <> +
{onSelectAllCategories && ( )} - - {/* Draggable category chips */} -
+ )} + + {/* Search — pushed to the right */} +
+
+ + onSearchChange(e.target.value)} + className="w-28 sm:w-52 h-8 pl-8 text-sm ring-inset" + aria-label="Search" + /> +
); } diff --git a/frontend/src/components/todos/TodosPage.tsx b/frontend/src/components/todos/TodosPage.tsx index 699fc6d..c549ae5 100644 --- a/frontend/src/components/todos/TodosPage.tsx +++ b/frontend/src/components/todos/TodosPage.tsx @@ -168,21 +168,19 @@ export default function TodosPage() {
{/* Category filter bar (All + Completed + Categories with drag) */} -
- -
+