Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update material you theming #3053

Merged
merged 7 commits into from
Jan 31, 2022
Merged

Conversation

Drakeoon
Copy link
Contributor

@Drakeoon Drakeoon commented Jan 27, 2022

Summary

We're officially starting the works with Material 3! 🎉 (Material You)

A more detailed description will probably appear on the next branch quite soon

The following changes were done:

  • Extracted and differentiated v2 and v3 themes (new themes structure)
  • Kept backwards compatibility (v2 is still used by default, will probably change to v3 by default with the ability to go easily return to v2)
  • Added v3 theme with:
    • New palette
    • New font sizes definition
    • New theme properties
    • md() helper that can be used with Material 3 tokens - md('md.ref.palette.tertiary90') -> #FFD8E4
    • Fully compliant with Material 3 guidelines

Test plan

As of now, the changes aren't affecting the app. Each PR that covers new components' support will have it's own preview and testing plans

@github-actions
Copy link

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

.

@@ -25,29 +25,114 @@ export type Fonts = {

type Mode = 'adaptive' | 'exact';

export type Theme = {
export type Material2Colors = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Total nitpick 🤏 -> if you have MD3Color maybe you should also have MD2Color?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, definitely. Will talk this through with Luke, as we typically exposed a clean Theme interface and now we would have some conditional types - it will get changed pretty soon, good catch!

Copy link
Contributor

@p-syche p-syche left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

I personally appreciate the most the backwards compatibility 💪

src/core/Provider.tsx Outdated Show resolved Hide resolved
src/core/Provider.tsx Outdated Show resolved Hide resolved
Copy link
Member

@lukewalczak lukewalczak left a comment

Choose a reason for hiding this comment

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

From the code perspective LGTM 🎉 ! I'm planning to run it on devices as well soon.

@Drakeoon
Copy link
Contributor Author

@lukewalczak I implemented the requested changes. Unfortunately one change is affects the major part of our codebase and causes the build to be red. I suggest creating a separate PR that fixes the build, as there are more than 80 components that need to be adjusted

@lukewalczak
Copy link
Member

@Drakeoon, make sense, let's merge that PR and iterate with fixing build on the next one.

@lukewalczak lukewalczak merged commit dfecfca into next Jan 31, 2022
@lukewalczak lukewalczak deleted the feat/update-material-you-theming branch January 31, 2022 13:45
lukewalczak pushed a commit that referenced this pull request Mar 22, 2022
lukewalczak pushed a commit that referenced this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants