Skip to content

Conversation

@shawnborton
Copy link
Contributor

@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.

image

Tests:

  1. On a blank chat, send a message and make sure the message is docked at the bottom of the screen
  2. Add more messages and make sure the bottom-docking is still happening
  3. With a chat that has many many messages, make sure the container scrolls normally

@shawnborton shawnborton self-assigned this Aug 27, 2020
Copy link
Contributor

@tgolen tgolen left a 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

bounces={false}
contentContainerStyle={{
paddingVertical: 16
flexGrow: 1,
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so I'm running into this when trying to apply a styles.whatever to the ScrollView container:
image

Copy link
Contributor Author

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!

@shawnborton
Copy link
Contributor Author

Updated!

@shawnborton
Copy link
Contributor Author

Ah, I see conflicts now... one moment.

@tgolen tgolen merged commit 7464f6e into master Aug 28, 2020
@tgolen tgolen deleted the shawn-flexEnd branch August 28, 2020 17:17
@perunt perunt mentioned this pull request Dec 20, 2023
50 tasks
@cloudflare-workers-and-pages
Copy link

Deploying helpdot with  Cloudflare Pages  Cloudflare Pages

Latest commit: 82cd752
Status: ✅  Deploy successful!
Preview URL: https://65638a02.helpdot.pages.dev

View logs

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.

3 participants