Skip to content

[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

Merged
merged 13 commits into from
Aug 30, 2022
Merged

Conversation

IanGClifton
Copy link
Contributor

@IanGClifton IanGClifton commented Aug 19, 2022

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

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.
@IanGClifton IanGClifton requested a review from a team as a code owner August 19, 2022 23:28
@IanGClifton IanGClifton requested review from florina-muntenescu and ricknout and removed request for florina-muntenescu August 19, 2022 23:28
Copy link
Contributor

@ricknout ricknout left a 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)

@IanGClifton
Copy link
Contributor Author

Found a few more issues that I'm working through now

@IanGClifton
Copy link
Contributor Author

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.
@ricknout
Copy link
Contributor

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 :)

Copy link
Contributor

@ricknout ricknout left a comment

Choose a reason for hiding this comment

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

Awesome! LGTM 🎉

@IanGClifton IanGClifton merged commit 36029ca into main Aug 30, 2022
@IanGClifton IanGClifton deleted the iangclifton/jetsurvey-m3 branch August 30, 2022 21:16
IanGClifton added a commit that referenced this pull request Sep 1, 2022
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>
IanGClifton added a commit that referenced this pull request Sep 2, 2022
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
vfishv added a commit to vfishv/compose-samples that referenced this pull request Sep 25, 2022
* 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)
  ...
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.

None yet

2 participants