Skip to content

Commit 3a58051

Browse files
authored
Merge pull request #1005 from objectstack-ai/copilot/optimize-filter-selection-box
2 parents 1ea1b20 + 2d96827 commit 3a58051

File tree

9 files changed

+642
-31
lines changed

9 files changed

+642
-31
lines changed

ROADMAP.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,13 @@ The `FlowDesigner` is a canvas-based flow editor that bridges the gap between th
10681068
- [x] Merged UserFilters row and tool buttons row into single toolbar line — left: field filter badges, right: tool buttons with separator
10691069
- [x] Search changed from inline input to icon button + Popover — saves toolbar space, matches Airtable pattern
10701070
- [x] UserFilters `maxVisible` prop added — overflow badges collapse into "More" dropdown with Popover
1071+
- [x] FilterBuilder: multi-select support for `in`/`notIn` operators — checkbox list UI replaces text input for select/lookup/master_detail fields
1072+
- [x] FilterBuilder: lookup/master_detail field types now show dropdown selector instead of manual ID input
1073+
- [x] FilterBuilder: all field types mapped — `currency`/`percent`/`rating` → number operators, `datetime`/`time` → date operators with proper input types, `status` → select operators, `user`/`owner` → lookup operators
1074+
- [x] FilterUI: `multi-select` filter type added — checkbox-based multi-value selection for filter forms
1075+
- [x] FilterCondition value type expanded to support arrays `(string | number | boolean)[]` for multi-value filters
1076+
- [x] ObjectView filterSchema: `lookup`/`master_detail`/`user`/`owner` fields auto-map to `multi-select` type; `status` fields auto-map to `select`
1077+
- [x] Console `normalizeFieldType`: `lookup`/`master_detail`/`user`/`owner`/`status`/`time` types now properly classified for filter/sort config
10711078
- [x] Toolbar layout uses flex with `min-w-0` overflow handling for responsive behavior
10721079

10731080
**Platform: ViewTabBar:**

apps/console/src/utils/view-config-utils.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,19 @@ export const BUILDER_TO_SPEC_OP: Record<string, string> = {
6565
// Field type normalization: ObjectUI → FilterBuilder
6666
// ---------------------------------------------------------------------------
6767

68+
/**
69+
* Normalize raw field types to the 5 categories supported by FilterBuilder/SortBuilder.
70+
* Lookup-like types (lookup, master_detail, user, owner) map to 'select' because
71+
* FilterBuilder handles them identically when options are provided — the distinction
72+
* between select and lookup operators is handled within FilterBuilder itself via the
73+
* original field.type passed through ListView's filterFields.
74+
*/
6875
export function normalizeFieldType(rawType?: string): 'text' | 'number' | 'boolean' | 'date' | 'select' {
6976
const t = (rawType || '').toLowerCase();
7077
if (['integer', 'int', 'float', 'double', 'number', 'currency', 'money', 'percent', 'rating'].includes(t)) return 'number';
71-
if (['date', 'datetime', 'datetime_tz', 'timestamp'].includes(t)) return 'date';
78+
if (['date', 'datetime', 'datetime_tz', 'timestamp', 'time'].includes(t)) return 'date';
7279
if (['boolean', 'bool', 'checkbox', 'switch'].includes(t)) return 'boolean';
73-
if (['select', 'picklist', 'single_select', 'multi_select', 'enum'].includes(t)) return 'select';
80+
if (['select', 'picklist', 'single_select', 'multi_select', 'enum', 'status', 'lookup', 'master_detail', 'user', 'owner'].includes(t)) return 'select';
7481
return 'text';
7582
}
7683

0 commit comments

Comments
 (0)