Conversation
* Known limitation: surface/container roles on API 31-33 use * @color/m3_ref_palette_dynamic_neutral_variant* (MCL resources that require a * native DynamicColors setup). No @android:color/ equivalent exists for those * slots. Reference palette values are used as fallback on API 31-33.
* revert previously marked @deprecated
* remove extra theme tokens (onSurfaceDisabled, backdrop replaced with scrim) * remove custom rippleColor from components * fix component colors as per MD guidelines
|
Hey @adrcotfas, thank you for your pull request 🤗. The documentation from this branch can be viewed here. |
There was a problem hiding this comment.
Please split the PR into multiple PRs with stacked PRs. This PR is doing too many things. Reviewing individual commits isn't sufficient; the changes will still get merged in a single commit without splitting.
- MD2 removal
- Dynamic themes
Updated MD3 color schema
State layer opacity tokens: Updated to match the current MD3 spec.
There was already a task on the bench Notion board about this, and existing PR. Please collaborate with @wonderlul and remove these changes from here #4886
Removed disabled FAB state: MD3 guidelines don't have a disabled state for FABs.
Removed customRippleColor: Not part of the native Material API. It offered too much customization at the cost of correctness, so it's gone from all components.
Removal of features is unrelated to the task. Also, who decides it offers "too much customization"? Please revert them and create issue/separate PR for discussion before removing features.
Next steps
Material Expressive components
Please discuss these first so they can be properly prioritized considered.
Update the documentation
Documentation update should be part of the PR that changes things.
Note
Sorry for the large PR!
Reviewing should be easier by going through the individual commits.
Motivation
This replaces @pchmn/expo-material3-theme with React Native's built-in PlatformColor, so dynamic colors on Android 12+ work without any native module.
The MD3 color schema also had gaps and inaccurate values compared to the https://m3.material.io/styles/color/roles. Several color roles were missing, state layer opacity tokens were off, and some values were stale from the original 2021
release. This fixes all of that along with the removal of MD2 support.
What changed:
Known limitation:
PlatformColorcan't be combined withalphainandroid_ripple, so ripple colors for dynamic-themed components like filled buttons and FABs use a pre-calculated On-Surface color (Neutral 10/90) for now. This is what most MD3 components use anyway and the difference is barely noticeable due to ripple transparency. I'm investigating a change in RN Core for this.Next steps (out of scope for this PR):
Test plan