Skip to content

Optim/layout calculations and recompositions#2265

Merged
theovilardo merged 2 commits into
masterfrom
optim/layout-calculations-and-recompositions
Jun 5, 2026
Merged

Optim/layout calculations and recompositions#2265
theovilardo merged 2 commits into
masterfrom
optim/layout-calculations-and-recompositions

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

No description provided.

Updates the benchmark suite to cover multiple audio formats and refactors the player sheet layout logic to improve animation stability and prevent jank during transitions.

- Added specialized macrobenchmark tests for FLAC, MP3, M4A, and OPUS playlists in `PlayerSheetAnimationBenchmarks`.
- Implemented `playFromPlaylist` and navigation helpers in `MacrobenchmarkScope` to automate playlist selection using localized text patterns or coordinate-based fallbacks.
- Refactored `UnifiedPlayerSheetV2` layout constraints to use full-screen width measurement during expansion, applying a negative horizontal offset to maintain alignment while preventing layout shifts.
- Simplified backstack navigation in `BaselineProfileGenerator` by making `pressBackAndWait` unconditional for optional surfaces.
- Expanded UI automation patterns to include localized strings for "Expand menu" and "Playlists" across multiple languages.
Refactors the mini player layout within the unified player sheet to dynamically adjust its width and horizontal position based on expansion progress. This ensures the mini player correctly accounts for screen padding as it transitions to the full player view.

- Added `currentHorizontalPaddingStartPxProvider` and `currentHorizontalPaddingEndPxProvider` parameters to the player layer components.
- Implemented a custom `.layout` modifier in `UnifiedPlayerSheetLayers.kt` to calculate and apply horizontal offsets and width constraints during expansion.
- Used the `playerContentExpansionFraction` to conditionally apply padding, ensuring the mini player maintains its intended width and alignment.
- Updated `UnifiedPlayerSheetV2.kt` to pass the padding providers into the player sheet's layer hierarchy.
@theovilardo theovilardo merged commit 0af3e78 into master Jun 5, 2026
3 of 4 checks 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.

1 participant