-
Notifications
You must be signed in to change notification settings - Fork 5k
[Jetsurvey] Converted to use Material 3 #954
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
Conversation
This creates the theme with typography, colorscheme, etc. Right now m2 and m3 live side-by-side but the m2 theme has been renamed to JetsurveyThemeOld. The first bits of WelcomeFragment have been migrated as well.
This converts all Jetsurvey components like Button or Text to their m3 versions and updates all theming to be m3. There is still a lot of visual work to be done as well as fixing the custom content alphas and various colors throughout, but now it's functional.
This completely removes the Material2 dependency. The last pieces that were using it were the local overrides of alpha values, which are now set manually at that site based on the design.
Jetsurvey has had an issue since before this migration where the status bar text/icons were too light in light mode. This fixes that my using Accompanist, but I didn't enable edge-to-edge yet. I also missed that m3 has a custom TopAppBar to use when the text is center-aligned, so I switched to that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Please can you include before/after screenshots for M2 and M3 (in both light and dark themes)
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/signinsignup/SignInScreen.kt
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/signinsignup/SignInSignUp.kt
Outdated
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/signinsignup/SignInSignUp.kt
Outdated
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/signinsignup/SignInSignUp.kt
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/signinsignup/WelcomeScreen.kt
Outdated
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/survey/SurveyQuestions.kt
Outdated
Show resolved
Hide resolved
Jetsurvey/app/src/main/java/com/example/compose/jetsurvey/theme/Theme.kt
Outdated
Show resolved
Hide resolved
Found a few more issues that I'm working through now |
It's looking much closer now! Please take a look |
This updates Jetsurvey to use the version catalog. The only meaningful differences from main are to use material3 and accompanist systemuicontroller in build.gradle.kts.
A few minor comments left (and some things to possibly address based on our email thread) but it's very close! Friendly reminder to please include screenshots in the main description :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! LGTM 🎉
This updates Jetsurvey from Material 2 to Material 3. All Compose components now use Material 3 instead of Material 2. The date picker is currently still using the MaterialDatePicker DialogFragment the same as before this change. This also fixes the visibility of the status bars when in light mode and updates the screenshot and animated gif. Before: https://raw.githubusercontent.com/android/compose-samples/70d05efe9c5de6d3788ac3c6023caa20761d410a/Jetsurvey/screenshots/survey.gif After: https://raw.githubusercontent.com/android/compose-samples/ede93fc907ad32c61bd7f3d55a33af48e782ea2a/Jetsurvey/screenshots/survey.gif Co-authored-by: Ian G. Clifton <IanGClifton@users.noreply.github.com>
This updates Jetsurvey from Material 2 to Material 3. All Compose components now use Material 3 instead of Material 2. The date picker is currently still using the MaterialDatePicker DialogFragment the same as before this change. This also fixes the visibility of the status bars when in light mode and updates the screenshot and animated gif. Before: https://raw.githubusercontent.com/android/compose-samples/70d05efe9c5de6d3788ac3c6023caa20761d410a/Jetsurvey/screenshots/survey.gif After: https://raw.githubusercontent.com/android/compose-samples/ede93fc907ad32c61bd7f3d55a33af48e782ea2a/Jetsurvey/screenshots/survey.gif
* commit '5bc3451b11f9aae111b8a6dca0199a317c997a2b': (331 commits) Updating to safe flow collection with collectAsStateWithLifecycle() (android#970) [Jetsurvey] Converted to use Material 3 (android#954) [JetNews] Remove invalid comment (android#966) [Jetnews] Update to Material3 (android#964) Compose latest (android#961) Disable auto creation of deps PRs for renovate (android#960) Version Catalog support (android#950) Fixing: Remove Unused If-Else condition (android#884) [Jetcaster] Fix recomposition loop in verticalGradientScrim (android#946) Fix readme image size (android#926) Fix a11y bugs (android#914) Update Androidx Lifecycle deps to v2.5.1 (android#932) Update plugin com.android.test to v7.2.2 (android#931) [Crane] Fix destinations not in list issue. (android#938) Update main | Compose 1.2.1 | Compiler 1.3.0 | Kotlin 1.7.10 (android#924) Update accompanist_version to v0.25.1 added licence to shapes added shapes for material Added a fix to not show back button on permanent drawer, added Material shapes [All] Updating to Compose 1.2 (android#905) ...
This updates Jetsurvey from Material 2 to Material 3. All Compose components now use Material 3 instead of Material 2. The date picker is currently still using the MaterialDatePicker DialogFragment the same as before this change. This also fixes the visibility of the status bars when in light mode and updates the screenshot and animated gif.
Before: https://raw.githubusercontent.com/android/compose-samples/70d05efe9c5de6d3788ac3c6023caa20761d410a/Jetsurvey/screenshots/survey.gif
After: https://raw.githubusercontent.com/android/compose-samples/ede93fc907ad32c61bd7f3d55a33af48e782ea2a/Jetsurvey/screenshots/survey.gif