Skip to content

refactor: compose shared .clearButton CSS instead of duplicating it - #1798

Merged
mrbobbytables merged 1 commit into
mainfrom
arch/refactor-clearbutton-css
Oct 22, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
arch/refactor-clearbutton-css

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Refactor

EmptyFilterState.module.css and FilterToolbar.module.css carried an
identical 22-line .clearButton rule set (base rule, :hover, and
:focus-visible). EmptyFilterState.module.css now composes the rule from
FilterToolbar.module.css via CSS Modules composes: clearButton from './FilterToolbar.module.css', the same pattern already used for
OrgAvatar.module.css's shared .wrapper rule
(src/components/MemberDirectory/styles.module.css). Each component's own
styles.clearButton JS 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

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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 95e4d4c
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6ada6a89ebe19bf66915555a
😎 Deploy Preview https://deploy-preview-1798--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 at src/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 in src/components/MemberDirectory/styles.module.css, and EmptyFilterState.js keeps using styles.clearButton, so consumers are untouched.
  • One tiny behavioral delta I verified is a no-op: FilterToolbar's @media (prefers-reduced-motion: reduce) block sets transition: none on .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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] .clearButton CSS block byte-duplicated between EmptyFilterState.module.css and FilterToolbar.module.css

1 participant