-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Make comments start at bottom of container #311
Conversation
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.
OMG You figured this out! It was driving me nuts
@@ -142,7 +142,9 @@ class ReportHistoryView extends React.Component { | |||
onContentSizeChange={this.scrollToListBottom} | |||
bounces={false} | |||
contentContainerStyle={{ | |||
paddingVertical: 16 | |||
flexGrow: 1, |
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.
I think these can be referenced like our other styles, so how about moving these into the stylesheet?
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.
That would work. I think paddingVertical
has to be referenced as a contentContainerStyle
This is a little over my head, but can you check this doc and let me know if we can take the styles.whatever
approach for the other rules? https://reactnative.dev/docs/scrollview
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.
Yep, I looked at that, and it should work to use our normal styles.whatever
👍
The paddingVertical
is fine to put into styles.whatever
and looks like it will work for anything. The docs say it's a shorthand for specifying top and bottom padding: https://reactnative.dev/docs/layout-props#paddingvertical
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.
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.
Ah nvm - contentContainerStyle={[styles.chatContentScrollView]}
seems to do the trick!
Updated! |
Ah, I see conflicts now... one moment. |
@tgolen @marcaaron will you please test and review? This makes comments start at the bottom of the scroll view container, so when you start a new chat with someone, everything is bottom-docked until it eventually scrolls.
Tests: