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

Refactor: Handle ambient mode in Exercise screens #317

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

yschimke
Copy link
Contributor

@yschimke yschimke commented Dec 6, 2024

This commit introduces changes to handle ambient mode within individual exercise screens instead of globally.

  • An AmbientAware composable is added to each screen to control ambient behavior.
  • Modifiers for ambient mode (ambientGray, ambientBlank) are applied within the screen composables.
  • Removed the ambientState parameter from composables and adjusted accordingly.

Uses a temporary copy of AmbientAware until horologist release

This commit introduces changes to handle ambient mode within individual exercise screens instead of globally.

- An AmbientAware composable is added to each screen to control ambient behavior.
- Modifiers for ambient mode (ambientGray, ambientBlank) are applied within the screen composables.
- Removed the ambientState parameter from composables and adjusted accordingly.
@yschimke yschimke requested review from kul3r4 and garanj December 6, 2024 08:04
Migrated from `HorizontalPager` and `ScreenScaffold` to `PagerScreen` for better navigation within the exercise screen.
Adjusted the control button logic to navigate between screens using coroutines and `animateScrollToPage` when resuming or pausing an exercise.
Updated the layout to accommodate the new structure and improve the user experience.
Migrated from `HorizontalPager` and `ScreenScaffold` to `PagerScreen` for better navigation within the exercise screen.
Adjusted the control button logic to navigate between screens using coroutines and `animateScrollToPage` when resuming or pausing an exercise.
Updated the layout to accommodate the new structure and improve the user experience.
This change adds Ambient support for the Exercise and Preparing screens:
- The Exercise screen now supports the Ambient state by displaying a blank screen when ambient.
- The Preparing screen now uses a gray background when ambient.
- Updates existing screenshot tests to cover ambient state.
Migrated `AmbientAware` and `AmbientState` from the local package to the Horologist library.
This change updates the imports to use the Horologist versions of these components.
@yschimke yschimke marked this pull request as ready for review December 6, 2024 14:25
@yschimke yschimke merged commit 6430cfd into android:main Dec 6, 2024
1 check passed
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.

2 participants