Repository navigation
feat: paint contentContainerStyle backgroundColor and honor flexGrow #28
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
Open
SectionTN
wants to merge
8
commits into
feat/grid-row-heights
Choose a base branch
from
feat/content-container-styles
base: feat/grid-row-heights
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+744
−45
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e5f7d5c
feat: paint contentContainerStyle backgroundColor and resolve percent…
SectionTN 3d84f45
feat: honor flexGrow with justifyContent and a growing footer
SectionTN b6de41f
fix: name flexGrow and justifyContent in the contentContainerStyle wa…
SectionTN b47d8ea
fix: read a percent padding with a leading decimal point
SectionTN b84737c
fix: let a footer's explicit flexGrow win over flex
SectionTN ecf16da
fix(ios): keep an end-stacked list's anchor when centered content grows
SectionTN 607a910
fix: move flex-end content to the end without opening the list there
SectionTN e7a7438
chore(example): add flex-end cases to the Compare tab
SectionTN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
34 changes: 34 additions & 0 deletions
34
android/src/test/java/me/sectiontn/flume/ContentPlacementTest.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package me.sectiontn.flume | ||
|
|
||
| import org.junit.Assert.assertEquals | ||
| import org.junit.Test | ||
|
|
||
| // Three rows of 100 in a viewport of 600. | ||
| class ContentPlacementTest { | ||
| @Test | ||
| fun shortContentMovesToTheCenterOnceAndStays() { | ||
| assertEquals(150, ContentPlacement.shift(ContentJustify.Center, firstStart = 0, lastEnd = 300, viewportStart = 0, viewportEnd = 600)) | ||
| assertEquals(0, ContentPlacement.shift(ContentJustify.Center, firstStart = 150, lastEnd = 450, viewportStart = 0, viewportEnd = 600)) | ||
| assertEquals(0, ContentPlacement.shift(ContentJustify.Center, firstStart = 0, lastEnd = 900, viewportStart = 0, viewportEnd = 600)) | ||
| } | ||
|
|
||
| @Test | ||
| fun shortContentMovesToTheEndOnceAndStays() { | ||
| assertEquals(300, ContentPlacement.shift(ContentJustify.End, firstStart = 0, lastEnd = 300, viewportStart = 0, viewportEnd = 600)) | ||
| assertEquals(0, ContentPlacement.shift(ContentJustify.End, firstStart = 300, lastEnd = 600, viewportStart = 0, viewportEnd = 600)) | ||
| assertEquals(0, ContentPlacement.shift(ContentJustify.End, firstStart = 0, lastEnd = 900, viewportStart = 0, viewportEnd = 600)) | ||
| } | ||
|
|
||
| @Test | ||
| fun justifyContentNamesMapToPlacements() { | ||
| assertEquals(ContentJustify.End, ContentJustify.of("end")) | ||
| assertEquals(ContentJustify.Center, ContentJustify.of("center")) | ||
| assertEquals(ContentJustify.Start, ContentJustify.of(null)) | ||
| } | ||
|
|
||
| @Test | ||
| fun aGrowingFooterTakesWhatTheRowsAboveLeave() { | ||
| assertEquals(300, ContentPlacement.footerMinPx(contentStart = 0, footerStart = 300, viewportPx = 600)) | ||
| assertEquals(0, ContentPlacement.footerMinPx(contentStart = 0, footerStart = 700, viewportPx = 600)) | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.