Skip to content

Commit e0dff4d

Browse files
committed
save notes
1 parent 88e908e commit e0dff4d

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Explorer / CCDB filter panel alignment and DSR extraction notes
2+
3+
## Current alignment
4+
5+
Explorer and CCDB are now strongly aligned at the reusable presentation layer.
6+
7+
- Both panel surfaces use the CFPB Design System `o-well` class for box sizing,
8+
responsive padding, the gray background, and border.
9+
- Collapsible filters share the same basic DOM and Design System classes:
10+
`o-expandable`, a button header, `Heading` label, round plus/minus cues, and
11+
expandable content with a divider.
12+
- Aggregation leaf rows use the same structure: a DSR `Checkbox`, visible label,
13+
and a gray right-aligned count.
14+
- Aggregation parent rows use a separate checkbox and toggle button. The toggle
15+
contains the visible label, count, and up/down caret, so checking a parent does
16+
not also expand it.
17+
- Both implementations support an indeterminate parent checkbox when only child
18+
values are selected.
19+
- Nested lists use `ul.children`, matching indentation and row dividers.
20+
- Both implementations initially show five aggregation options before offering
21+
Show more / Show less.
22+
23+
The expandable, aggregation-item, and aggregation-branch presentation is roughly
24+
90% aligned and is ready to inform DSR extraction.
25+
26+
## Recommended DSR extraction boundary
27+
28+
Start with small controlled presentation components rather than extracting the
29+
entire filter panel:
30+
31+
1. `FilterExpandable`
32+
2. `AggregationOption`
33+
3. `AggregationBranch`
34+
4. Optionally, a small `FilterList` styling wrapper
35+
36+
The expandable should support both controlled and uncontrolled state. Explorer
37+
stores expanded filters in Redux, while CCDB currently uses local React state.
38+
39+
Useful configurable inputs include:
40+
41+
- caller-provided IDs
42+
- label and description
43+
- expanded state and expansion callback
44+
- checked and indeterminate state
45+
- disabled state
46+
- count or caller-rendered count content
47+
- parent selection callback
48+
- branch expansion callback
49+
- nested children
50+
51+
## Keep application-owned
52+
53+
Do not move these concerns into DSR:
54+
55+
- Redux state or actions
56+
- aggregation fetching and response normalization
57+
- complaint field names
58+
- selected-filter sorting and parent/child replacement algorithms
59+
- Explorer's Select all behavior
60+
- loading and empty-data behavior
61+
- date, age, company, ZIP, and typeahead controls
62+
- application-specific panel open/close behavior
63+
- show-more limits as filtering policy, even though both currently use five
64+
65+
## Remaining intentional differences
66+
67+
- Explorer has Select all; CCDB does not.
68+
- Explorer manages filter expansion through Redux; CCDB uses local state.
69+
- Explorer has a fixed-width desktop sidebar and its own desktop/mobile panel
70+
toggle, loading overlay, age filter, and date layouts.
71+
- CCDB uses explicit `hr` elements between top-level sections and removes the
72+
well's top border because its filter well touches the search well above it.
73+
- The applications use different filtering and parent/child selection logic,
74+
despite rendering nearly identical rows.
75+
- CCDB supports disabled aggregation options. Explorer does not currently expose
76+
that option in its aggregation component interfaces.
77+
78+
## Panel-shell recommendation
79+
80+
The entire panel should not be the first shared component. `o-well` now provides
81+
the common surface, but width, neighboring borders, mobile controls, loading,
82+
and state remain application-specific. Extract the expandable and aggregation
83+
rows first; revisit a configurable panel shell only after both applications use
84+
the shared primitives.
85+

0 commit comments

Comments
 (0)