-
Notifications
You must be signed in to change notification settings - Fork 306
anchors 5/n: Control scroll position #1436
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9038591
msglist [nfc]: Cut already-broken logic for slightly less padding at …
gnprice 41351f9
msglist [nfc]: Introduce MessageListScrollView, not yet doing anythin…
gnprice 019ae88
scroll [nfc]: Copy RenderViewport.performLayout and friends from upst…
gnprice a51ad1c
msglist [nfc]: Introduce MessageListScrollPosition
gnprice 91f7b69
msglist [nfc]: Force anchor to 1.0
gnprice 5b32b58
scroll [nfc]: Introduce applyContentDimensionsRaw on scroll position
gnprice 60fae99
scroll: Start out scrolled to bottom of list
gnprice eec002d
scroll: Keep short list pinned at bottom of viewport, not past bottom
gnprice f20dfb7
scroll: Stay at end once there
gnprice 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
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.
I'm trying to understand
anchor
; could you confirm that this part ofRenderViewport.anchor
's dartdoc is correct?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's a code example at the doc link; here's what it looks like with the code as-is, with
AxisDirection.right
and anchor 0.5:And if I just change anchor to 1.0:
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 sounds backward to me — I'd say that's true if you replace either "1.0" with "0.0", or ".right" with ".left", or "left edge" with "right edge". (Or all three.)
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's helpful, thanks. I'm curious if this also confused you when you were first learning it :)
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 I did run across that bit of docs recently and puzzled for a bit over whether there was a way to interpret it that made that description correct. (The wording "the zero scroll offset is on the left edge of the viewport" is itself a bit vague.)
I don't recall when I was first figuring out what
anchor
means. It appears inbdac26f and d4490b1 from last January, so I must have had at least an empirical understanding by then.