Repository navigation
refactor: compose shared .clearButton CSS instead of duplicating it - #1798
Conversation
EmptyFilterState.module.css and FilterToolbar.module.css carried an identical 22-line .clearButton rule set (base, :hover, :focus-visible). EmptyFilterState.module.css now composes the rule from FilterToolbar.module.css via CSS Modules composes:, the same pattern already used for OrgAvatar.module.css's shared .wrapper rule. Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "architect" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Read both files at head 95e4d4c, not just the diff. This looks correct to me.
- The 22 lines removed from
src/components/shared/EmptyFilterState.module.css(base rule,:hover,:focus-visible) are byte-identical to the surviving set atsrc/components/shared/FilterToolbar.module.css:79-97, so the composed button renders the same. composes: clearButton from './FilterToolbar.module.css'matches the existing cross-file composition pattern insrc/components/MemberDirectory/styles.module.css, andEmptyFilterState.jskeeps usingstyles.clearButton, so consumers are untouched.- One tiny behavioral delta I verified is a no-op: FilterToolbar's
@media (prefers-reduced-motion: reduce)block setstransition: noneon.clearButton, which the EmptyFilterState button now also inherits — harmless, since neither rule defines a transition.
No findings. Reasonable dedup with the jscpd ceiling benefit the body claims (35/35 → 34/35) matching the actual removal.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
Refactor
EmptyFilterState.module.cssandFilterToolbar.module.csscarried anidentical 22-line
.clearButtonrule set (base rule,:hover, and:focus-visible).EmptyFilterState.module.cssnow composes the rule fromFilterToolbar.module.cssvia CSS Modulescomposes: clearButton from './FilterToolbar.module.css', the same pattern already used forOrgAvatar.module.css's shared.wrapperrule(
src/components/MemberDirectory/styles.module.css). Each component's ownstyles.clearButtonJS reference, and the compiled class name consumers see,is unchanged.
npm run check:duplication's CSS/YAML jscpd ceiling (.jscpd.css-yaml.json)was fully consumed (35/35 exact clones) before this change; it now sits at
34/35, restoring headroom for unrelated CSS work.
Fixes #1796
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88