Migrate mwc-fab to md-fab#982
Merged
DavidMStraub merged 1 commit intogramps-project:mainfrom Mar 9, 2026
Merged
Conversation
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>
Member
Author
|
Related to #541 |
Contributor
There was a problem hiding this comment.
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-fabto@material/web/fab/fab.jsand removed@material/mwc-fabfrom 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).