Skip to content

chore: remove md2#4898

Open
xdimota7x wants to merge 4 commits intomainfrom
chore/remove-md2
Open

chore: remove md2#4898
xdimota7x wants to merge 4 commits intomainfrom
chore/remove-md2

Conversation

@xdimota7x
Copy link
Copy Markdown
Collaborator

Motivation

This PR removes Material Design 2 support and makes the library MD3-only.
The goal is to simplify the codebase by removing MD2/MD3 branching across components, theming, and utilities, reducing maintenance overhead and inconsistency risk.

Related issue

Paper currently supports both MD2 and MD3, with many conditional code paths (isV3, version-specific theme logic) spread across components and core theming.
This PR addresses that by removing MD2 themes and all associated MD2 behavior/exports.

Test plan

  • All test suites should pass
  • MD3 components should behave as they currently do
  • Components previously branching on MD2/MD3 still render correctly (e.g., Button, Chip, Searchbar, Snackbar, TextInput, SegmentedButtons)

@xdimota7x xdimota7x mentioned this pull request Apr 15, 2026
@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here.

@adrcotfas
Copy link
Copy Markdown
Collaborator

adrcotfas commented Apr 22, 2026

I think we should remove src/components/Typography/v2 too together with any isV3 usage which is always true.

@xdimota7x
Copy link
Copy Markdown
Collaborator Author

Thanks for the suggestion @adrcotfas. Addressed the Typography/v2, as well as the version specific references from types and config in the latest commit.

@callstack-bot
Copy link
Copy Markdown

Hey @xdimota7x, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

Comment on lines -105 to -106
subtitle,
subtitleStyle,
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.

Since we have removed the usage of subtitle and subtitleStyle we can remove it from the type.

getLabelText = ({ route }: { route: Route }) => route.title,
getBadge = ({ route }: { route: Route }) => route.badge,
getColor = ({ route }: { route: Route }) => route.color,
getColor: _getColor = ({ route }: { route: Route }) => route.color,
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.

Since we are removing the usage of getColor please remove it from the Props or add a dev warning on first call so consumers migrating from 5.x know to drop it.

@ruben-rebelo
Copy link
Copy Markdown
Collaborator

Thank you so much for you work @xdimota7x!
I added really small comment just for small clean up of types that I could find.
Overall it looks really good and I'm happy to merge it!

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.

4 participants