Skip to content
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

CONV-1435: Gravity layout #498

Merged
merged 1 commit into from
Aug 2, 2023
Merged

CONV-1435: Gravity layout #498

merged 1 commit into from
Aug 2, 2023

Conversation

gilgtm
Copy link
Collaborator

@gilgtm gilgtm commented Jul 25, 2023

  • Adds a new Chat App demo and a new behavior called verticalLayoutGravity. When verticalLayoutGravity is set to bottom, scrolling works the way you would expect for a messaging app.
gravity-demo.mp4

Checklist

Please do the following before merging:

  • Ensure any public-facing changes are reflected in the changelog. Include them in the Main section.

Copy link
Collaborator

@nononoah nononoah left a comment

Choose a reason for hiding this comment

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

Previously reviewed in nearly this state and approved. It would be good to get someone else from UI Systems to weigh in, or even Kyle.

let targetY = self.contentOffset.y + heightDelta

self.contentOffset.y = min(targetY, maxContentOffsetY)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add an assert if .bottom is provided, but the layout direction is .horizontal? Just so folks know it's not supported.

Copy link
Collaborator Author

@gilgtm gilgtm Jul 28, 2023

Choose a reason for hiding this comment

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

  • todo

Copy link
Collaborator

@kyleve kyleve left a comment

Choose a reason for hiding this comment

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

Really nice work – thank you for getting this across the line!

@gilgtm gilgtm force-pushed the gil/custom-keyboard-adjustment-mode branch from f11883f to 94ac6f9 Compare August 2, 2023 17:55
Base automatically changed from gil/custom-keyboard-adjustment-mode to main August 2, 2023 18:41
@gilgtm gilgtm force-pushed the gil/gravity branch 2 times, most recently from 0643576 to b4a0e45 Compare August 2, 2023 18:47
@gilgtm gilgtm enabled auto-merge August 2, 2023 18:47
- Adds a new Chat App demo and a new behavior called verticalLayoutGravity.  When verticalLayoutGravity is set to bottom, scrolling works the way you would expect for a messaging app.
@gilgtm gilgtm merged commit c24bf28 into main Aug 2, 2023
4 checks passed
@gilgtm gilgtm deleted the gil/gravity branch August 2, 2023 22:11
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