-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fixes main content padding on various screens #2906
Merged
f-odhiambo
merged 11 commits into
main
from
2892-fix-main-content-padding-on-various-screens
Dec 6, 2023
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bd89d3d
adds padding to the profile lazy column
brandyodhiambo bbca399
Merge branch 'main' into 2892-fix-main-content-padding-on-various-scr…
brandyodhiambo 8568e31
setting padding on Register footer row ,on measure report list screen.
brandyodhiambo 8a5f890
fixes MeasureReport List Screen
brandyodhiambo f134986
runs profile screen test
brandyodhiambo 34599c0
runs engine test
brandyodhiambo f5a50b9
runs spotless
brandyodhiambo 017decc
edits the constant paddings on profile screen and register footer
brandyodhiambo f3fb14f
edits the constant paddings on profile screen and register footer
brandyodhiambo 0467433
runs quest spotless
brandyodhiambo 2552ac3
runs engine spotless
brandyodhiambo 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 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 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 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 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 |
---|---|---|
|
@@ -94,7 +94,7 @@ fun ProfileScreen( | |
LaunchedEffect(Unit) { | ||
snackStateFlow.hookSnackBar(scaffoldState, profileUiState.resourceData, navController) | ||
} | ||
|
||
val fabActions = profileUiState.profileConfiguration?.fabActions | ||
Scaffold( | ||
scaffoldState = scaffoldState, | ||
topBar = { | ||
|
@@ -118,8 +118,6 @@ fun ProfileScreen( | |
} | ||
}, | ||
floatingActionButton = { | ||
val fabActions = profileUiState.profileConfiguration?.fabActions | ||
|
||
if (!fabActions.isNullOrEmpty() && fabActions.first().visible) { | ||
ExtendedFab( | ||
modifier = Modifier.testTag(FAB_BUTTON_TEST_TAG), | ||
|
@@ -154,7 +152,10 @@ fun ProfileScreen( | |
color = MaterialTheme.colors.primary, | ||
) | ||
} | ||
LazyColumn(state = lazyListState) { | ||
LazyColumn( | ||
state = lazyListState, | ||
modifier = Modifier.padding(bottom = if (!fabActions.isNullOrEmpty() && fabActions.first().visible) 80.dp else 32.dp) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Convert these to constants with intuitive names e.g |
||
) { | ||
item(key = profileUiState.resourceData?.baseResourceId) { | ||
ViewRenderer( | ||
viewProperties = profileUiState.profileConfiguration?.views ?: emptyList(), | ||
|
This file contains 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert these to constants with intuitive names e.g
FOOTER_PADDING_WITH_FAB
,FOOTER_PADDING_WITHOUT_FAB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be a constant variable? for both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my suggested code in the comments. The idea is to define the padding values in 2 separate constants to be reused in all screens.