Skip to content

Commit f2e1da5

Browse files
Copilothotlong
andcommitted
fix: address code review - remove shadowed variable, simplify complex condition
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 987e0a6 commit f2e1da5

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

ROADMAP.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,10 @@ The `FlowDesigner` is a canvas-based flow editor that bridges the gap between th
932932
- [x] Separators conditionally rendered only when adjacent groups are visible
933933
- [x] Inline search moved to toolbar left end (`w-48`, Airtable-style)
934934
- [x] Density button: activated state highlight (`bg-primary/10 border border-primary/20`) when density is non-default
935+
- [x] Merged UserFilters row and tool buttons row into single toolbar line — left: field filter badges, right: tool buttons with separator
936+
- [x] Search changed from inline input to icon button + Popover — saves toolbar space, matches Airtable pattern
937+
- [x] UserFilters `maxVisible` prop added — overflow badges collapse into "More" dropdown with Popover
938+
- [x] Toolbar layout uses flex with `min-w-0` overflow handling for responsive behavior
935939

936940
**Platform: ViewTabBar:**
937941
- [x] Tab "•" dot indicator replaced with descriptive badge (`F`/`S`/`FS`) + tooltip showing "Active filters", "Active sort"
@@ -956,7 +960,7 @@ The `FlowDesigner` is a canvas-based flow editor that bridges the gap between th
956960
**Tests:**
957961
- [x] 7 new CRM metadata tests validating column types, widths, rowHeight, conditionalFormatting
958962
- [x] 136 ViewConfigPanel tests updated for defaultCollapsed sections (expand before access)
959-
- [x] 411 ListView + ViewTabBar tests passing
963+
- [x] 411 ListView + ViewTabBar tests passing (255 plugin-list tests including 9 new toolbar/collapse tests)
960964
- [x] 11 AppSidebar tests passing
961965

962966
### P2.5 PWA & Offline (Real Sync)

packages/plugin-list/src/ListView.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,10 +1377,13 @@ export const ListView: React.FC<ListViewProps> = ({
13771377
</Button>
13781378
)}
13791379

1380-
{/* --- Separator: Print | Search --- */}
1381-
{toolbarFlags.showSearch && (schema.allowPrinting || (schema.sharing?.enabled || schema.sharing?.type) || (resolvedExportOptions && schema.allowExport !== false)) && (
1382-
<div className="h-4 w-px bg-border/60 mx-0.5 shrink-0" />
1383-
)}
1380+
{/* --- Separator: Print/Share/Export | Search --- */}
1381+
{(() => {
1382+
const hasLeftSideItems = schema.allowPrinting || (schema.sharing?.enabled || schema.sharing?.type) || (resolvedExportOptions && schema.allowExport !== false);
1383+
return toolbarFlags.showSearch && hasLeftSideItems ? (
1384+
<div className="h-4 w-px bg-border/60 mx-0.5 shrink-0" />
1385+
) : null;
1386+
})()}
13841387

13851388
{/* Search (icon button + popover) */}
13861389
{toolbarFlags.showSearch && (

packages/plugin-list/src/UserFilters.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ function DropdownFilters({ fields, objectDef, data, onFilterChange, maxVisible,
233233
</PopoverTrigger>
234234
<PopoverContent align="start" className="w-56 p-2">
235235
<div className="max-h-60 overflow-y-auto space-y-0.5" data-testid={`filter-options-${f.field}`}>
236-
{f.options.map(opt => {
237-
const selected = selectedValues[f.field] || [];
238-
return (
236+
{f.options.map(opt => (
239237
<label
240238
key={String(opt.value)}
241239
className={cn(
@@ -265,8 +263,7 @@ function DropdownFilters({ fields, objectDef, data, onFilterChange, maxVisible,
265263
<span className="text-xs text-muted-foreground">{opt.count}</span>
266264
)}
267265
</label>
268-
);
269-
})}
266+
))}
270267
</div>
271268
</PopoverContent>
272269
</Popover>

0 commit comments

Comments
 (0)