Skip to content

refactor: replace findable button wrappers with mui button (#4994) - #4995

Merged
frano-m merged 1 commit into
mainfrom
frano-m/4994-replace-findable-button-wrappers
Oct 21, 2026
Merged

frano-m merged 1 commit into
mainfrom
frano-m/4994-replace-findable-button-wrappers

Conversation

@frano-m

@frano-m frano-m commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #4994. Part of DataBiosphere/findable-ui#1125 and must land before DataBiosphere/findable-ui#1126 ships.

  • ButtonPrimary → MUI Button with BUTTON_PROPS.PRIMARY_CONTAINED in EntityDeprecated and EntityWithdrawn (still wrapped in next/link legacyBehavior).
  • ButtonTextPrimary → styled(Button) from @mui/material in fileLocationArchivePreview.styles.ts, keeping font-weight / justify-self; BUTTON_PROPS.PRIMARY_TEXT is spread at the call site. The wrapper's hover rule (transparent background + underline) is already covered by findable's theme primary/text variant.
  • ButtonOutline wrapper now types its props with MUI ButtonProps instead of findable's components/common/Button/button.
  • No imports of findable's ButtonPrimary, ButtonTextPrimary or components/common/Button/button remain.

Verification

Computed styles of each button were snapshotted on main and compared after the change, in default and hover states: zero differences for all three buttons.

  • "To Homepage" (deprecated + withdrawn HCA projects): identical styles; clicking navigates to /.
  • "Preview Archive": identical styles; clicking opens the archive preview dialog. Note this button is not currently rendered in the app (FileNameCell ignores archivePreview since Update findable-ui to latest version 47.0.2 #4613), so it was temporarily rendered locally for comparison only.

Screenshots

Checks

  • eslint, prettier, tsc ✅
  • build-ma-dev:hca-dcp ✅
  • jest: 239 passed ✅
  • e2e: anvil-catalog 48 passed (9 skipped), anvil-cmg 132 passed ✅

🤖 Generated with Claude Code

deprecated-after-default deprecated-after-hover deprecated-before-default deprecated-before-hover preview-archive-after-default preview-archive-after-hover preview-archive-before-default preview-archive-before-hover withdrawn-after-default withdrawn-after-hover withdrawn-before-default withdrawn-before-hover

@frano-m
frano-m marked this pull request as ready for review October 20, 2026 06:00
@frano-m
frano-m marked this pull request as draft October 20, 2026 06:00
@frano-m
frano-m marked this pull request as ready for review October 20, 2026 06:11
@frano-m

frano-m commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@NoopDog waiting for #4996

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The replacements are narrowly scoped, match the migration requirements, and have no identified blocking issues.

No open issues 🎉

What changed in this PR

Prepares the app for findable-ui’s button-wrapper retirement, addressing #4994 while preserving existing styling and behavior.

Changes:

  • Replaces primary and text button wrappers with MUI buttons and shared presets.
  • Preserves archive-preview styling and homepage link handling.
  • Uses MUI ButtonProps for the retained outline wrapper.
File Description
app/​components/​Detail/​components/​GeneratedMatricesTables/​components/​FileLocationArchivePreview/​fileLocationArchivePreview.tsx Applies the primary text preset.
app/​components/​Detail/​components/​GeneratedMatricesTables/​components/​FileLocationArchivePreview/​fileLocationArchivePreview.styles.ts Styles MUI Button directly.
app/​components/​Detail/​components/​EntityGuard/​components/​EntityWithdrawn/​entityWithdrawn.tsx Replaces the homepage button wrapper.
app/​components/​Detail/​components/​EntityGuard/​components/​EntityDeprecated/​entityDeprecated.tsx Replaces the homepage button wrapper.
app/​components/​common/​Button/​components/​ButtonOutline/​buttonOutline.tsx Switches props typing to MUI.

Review effort: Balanced

@NoopDog NoopDog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Fran, looks good. The red Playwright checks are GitHub's ubuntu-latest rollout to 26.04, which Playwright doesn't support yet, not this change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@frano-m
frano-m force-pushed the frano-m/4994-replace-findable-button-wrappers branch from a542577 to 36d91f6 Compare October 21, 2026 04:47
@frano-m
frano-m merged commit 3ce7c89 into main Oct 21, 2026
4 checks passed
@frano-m
frano-m deleted the frano-m/4994-replace-findable-button-wrappers branch October 21, 2026 04:59
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.

Replace findable Button wrappers with MUI Button

3 participants