Skip to content

Conversation

@Hixie
Copy link
Contributor

@Hixie Hixie commented Sep 2, 2020

It now uses the scroll metrics as they stood at the end of the last frame.

It previously used a weird combination of the old extents and the newish position, which led to some weird effects when the position had been changed in expectation of a viewport or content dimension change.

Fixes #60288 again.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 2, 2020
@Hixie
Copy link
Contributor Author

Hixie commented Sep 2, 2020

cc @goderbauer Would you mind reviewing this? It's the same patch as before plus an extra commit to fix review comments from the last PR.

@xu-baolin
Copy link
Member

So did you figure out what causes the internal test failed at the first land?

@AlexV525
Copy link
Member

AlexV525 commented Sep 3, 2020

Also resolves #63935 , #64899 ?

@Hixie
Copy link
Contributor Author

Hixie commented Sep 3, 2020

@xu-baolin We're pretty sure those failures were because tests were assuming the incorrect behavior that has been in the tree for a while (they were all new tests).

@Piinks Piinks added the f: scrolling Viewports, list views, slivers, etc. label Sep 3, 2020
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Flutter_LGTM

  • 1 nit

Copy link
Contributor

Choose a reason for hiding this comment

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

This test has no name.

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 yes, test names. One of the other features I'd just remove entirely if I were to create a new test framework. :-)

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

WE DON'T HAVE FUN HERE.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I seriously considered leaving the original or having it say "funny and fully" or something but...

It now uses the scroll metrics as they stood at the end of the last frame.

It previously used a weird combination of the old extents and the newish position, which led to some weird effects when the position had been changed in expectation of a viewport or content dimension change.
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Linux framework_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Rodiii
Copy link

Rodiii commented Sep 20, 2020

Hi all, hi @Hixie,
This PR crashed the pull_to_refresh plugin which possibly affects a huge amount of users (pub score 98%).

You can find a stackTrace / bug here:
peng8350/flutter_pulltorefresh#352

The issue is in applyContentDimensions within scroll_position.dart. If I revert the function to the commit before this PR, the issue disappears.

Is there any chance to revert this change?

@AlexV525
Copy link
Member

AlexV525 commented Sep 20, 2020

Is there any chance to revert this change?

@Rodiii I think we don't revert a commit for a package, but you can try to fix it by making a PR to the package.

@Rodiii
Copy link

Rodiii commented Sep 20, 2020

@AlexV525 Thanks for answering. Sorry, there has been a misunderstanding. I was not talking about the whole commit, I just meant the affected function.

Sure, I could just hand in a PR which reverts the function to before this commit. Anyhow, I guess this would brake the feature(s)/bugfixes @Hixie introduced with his PRs.

Anyhow, if I don't hear anything until tonight, I'll hand in a PR, as this issue just affects too many people.

@AlexV525
Copy link
Member

I just meant the affected function.

Because those commits you saw were squashed and merged as a single commit, there are no handy way to partially revert a commit inside them.

Sure, I could just hand in a PR which reverts the function to before this commit. Anyhow, I guess this would brake the feature(s)/bugfixes @Hixie introduced with his PRs.

I suggest you land the PR in the package repo, because it did fix something but might be a breaking change for some packages. That require packages update too.

@Hixie
Copy link
Contributor Author

Hixie commented Sep 20, 2020

Yeah, the right way to fix this is to fix the package. But in the future, the best thing is to have the package's tests submitted to the flutter/tests repository (https://github.com/flutter/tests), since we guarantee that we won't break tests submitted to that repo without first working with the package or application owner to migrate their code.

@Hixie Hixie deleted the b60288 branch September 20, 2020 18:40
@Rodiii
Copy link

Rodiii commented Sep 30, 2020

Hi all, Thanks for your responses. There are good news, the maintainer of pull_to_refresh just updated the library to support the most recent flutter revision. So there's no issue here anymore :-).

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

Labels

f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TabBarView offset when changing viewport from portrait to landscape

8 participants