feat: add RowDecoration support for full-width items in AspectoGrid - #6
Merged
Conversation
Add ability to insert full-width row decorations (headers, footers, ads, loaders) at specific row positions via a mutable decorations list. - Add RowDecoration data class with index, key, contentType, content - Add isFullWidth flag to AspectoRow - Update calculateRows() to accept and splice decorations - Update AspectoGrid composable to render full-width decoration rows - Add key collision detection between decoration and item-derived keys - Add 10 unit tests for decoration behavior - Update sample app to demonstrate mutable decorations with pagination
- RowDecoration data class for full-width items at specific row positions - spliceDecorations() with key collision detection - calculateRows() accepts decorations parameter - AspectoGrid renders full-width decoration rows - 10 unit tests for decoration behavior - Benchmark tests with percentiles (p50/p75/p90/p95/p99) - Sample app: BasicGrid + DecoratedGrid with previews - Scaffold padding fix for nested screens - CMP tooling dependencies for previews - build.yml CI workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RowDecorationdata class for inserting full-width items (headers, ads, footers) at specific row positions in the gridspliceDecorations()function with key collision detectioncalculateRows()accepts optionaldecorationsparameterAspectoGridrenders full-width decoration rowsChanges
AspectoLayoutInfo.kt: AddedRowDecorationdata classAspectoRow.kt: AddedisFullWidthflagAspectoRowCalculator.kt: AddedspliceDecorations(), updatedcalculateRows()with decorations paramAspectoGrid.kt: Addeddecorationsparameter, renders full-width rowsAspectoRowCalculatorTest.kt: 10 decoration unit testsAspectoRowCalculatorBenchmarkTest.kt: Benchmark tests with percentilesApp.kt,BasicGrid.kt,DecoratedGrid.kt,ArtworkItems.ktbenchmark/benchmark-results.json: Baseline benchmark results