Skip to content

Migrate mwc-fab to md-fab#982

Merged
DavidMStraub merged 1 commit intogramps-project:mainfrom
DavidMStraub:migrate-mwc-fab
Mar 9, 2026
Merged

Migrate mwc-fab to md-fab#982
DavidMStraub merged 1 commit intogramps-project:mainfrom
DavidMStraub:migrate-mwc-fab

Conversation

@DavidMStraub
Copy link
Member

Replace all uses of @material/mwc-fab with @material/web/fab/fab.js. Icons use grampsjs-icon in slot="icon" with MDI paths. Colors are overridden via CSS custom properties in :root to match the previous mwc-fab appearance (blue background, white icon).

Replace all uses of @material/mwc-fab with @material/web/fab/fab.js.
Icons use grampsjs-icon in slot="icon" with MDI paths. Colors are
overridden via CSS custom properties in :root to match the previous
mwc-fab appearance (blue background, white icon).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DavidMStraub
Copy link
Member Author

Related to #541

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the app’s floating action buttons from the deprecated @material/mwc-fab to Material Web’s @material/web <md-fab>, aligning FAB usage with the rest of the Material Web component stack and preserving the prior visual styling via CSS tokens.

Changes:

  • Replaced <mwc-fab> usages with <md-fab variant="secondary"> and moved icons to a slotted <grampsjs-icon> using MDI paths.
  • Switched imports from @material/mwc-fab to @material/web/fab/fab.js and removed @material/mwc-fab from dependencies.
  • Added a global CSS override for the secondary FAB container color to match the legacy mwc-fab appearance.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/views/GrampsjsViewYDna.js Replaces add FAB with <md-fab> and MDI-based grampsjs-icon.
src/views/GrampsjsViewTasks.js Migrates tasks FAB to <md-fab>, adds MDI plus icon usage, updates FAB styling selector.
src/views/GrampsjsViewObjectsBase.js Migrates list views’ FAB to <md-fab>, adds MDI plus icon usage, updates FAB styling selector and imports.
src/views/GrampsjsViewObject.js Migrates object edit FAB to <md-fab> with MDI pencil icon and updates styling selector/imports.
src/views/GrampsjsViewDnaMatches.js Migrates conditional add/edit FABs to <md-fab> with MDI icons.
src/views/GrampsjsViewDnaBase.js Switches base DNA view FAB import and updates FAB styling selector to md-fab.
package.json Removes @material/mwc-fab dependency.
global.css Adds --md-fab-secondary-container-color override to preserve legacy FAB color styling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavidMStraub DavidMStraub merged commit 81d5f65 into gramps-project:main Mar 9, 2026
5 checks passed
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.

2 participants