Skip to content

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Aug 21, 2020

Description

Currently we disregard rect in getOffsetToReveal's leadingScrollOffset calculation when onlySlivers is true. This PR adds the missing logic in that branch. This is needed to reland #56413, as persistent headers will have their own showOnScreen overrides once that PR relands.

Also moved some code from #56413 into this PR.

Related Issues

#25507

Tests

Improved existing tests.

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Aug 21, 2020
@LongCatIsLooong LongCatIsLooong force-pushed the viewport-showOnScreen-rect branch from 80c7038 to 51ddf6f Compare August 21, 2020 03:09
@LongCatIsLooong LongCatIsLooong force-pushed the viewport-showOnScreen-rect branch from 1971333 to 7a9d640 Compare August 21, 2020 17:53
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

// `rect` in the new intermediate coordinate system.
Rect rectLocal;
// Our new reference frame render object's main axis extent.
double localMaxExtent;
Copy link
Member

Choose a reason for hiding this comment

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

should this be called mainExtend instead of max? (not sure what max is referring too....)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants