Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Let scrollbars avoid obstructing slivers and media query paddings #13253

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

Closed
xster opened this issue Nov 29, 2017 · 15 comments · Fixed by #31763
Closed

Let scrollbars avoid obstructing slivers and media query paddings #13253

xster opened this issue Nov 29, 2017 · 15 comments · Fixed by #31763
Assignees
Labels
c: new feature Nothing broken; request for a new capability customer: crowd Affects or could affect many people, though not necessarily a specific customer. customer: money (g3) f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list

Comments

@xster
Copy link
Member

xster commented Nov 29, 2017

Internal: b/144318472

Consider a CustomScrollView with a SliverAppBar and a SliverList and the user wants a scrollbar showing the position inside the SliverList's contents only.

Let the SliverAppBar report SliverGeometry describing its obstructing and max obstructing extends. Let that get aggregated by the scrollable and bubbled up with a scroll notification so the scrollbar can start below the obstructing area.

@xster xster added c: new feature Nothing broken; request for a new capability f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. labels Nov 29, 2017
@xster xster added this to the 4: Next milestone milestone Nov 29, 2017
@xster xster added the f: cupertino flutter/packages/flutter/cupertino repository label Nov 29, 2017
@xster xster changed the title Let scrollbars avoid obstructing slivers Let scrollbars avoid obstructing slivers and media query paddings Nov 30, 2017
@xster
Copy link
Member Author

xster commented Nov 30, 2017

Also avoid media query partial obstructions

@xster
Copy link
Member Author

xster commented Jun 3, 2019

This issue isn't closed yet is it? Since there's still the sliver half of it.

@LongCatIsLooong
Copy link
Contributor

It was closed because I put partially fixes in my PR.

@spkersten
Copy link
Contributor

spkersten commented Sep 13, 2019

We've also run into this problem. We are using a PersistenHeader for our app bar, so it would be good if a solution would not just work with SliverAppBar but can also be used for custom headers.

Another note for clarity: In our case we have several slivers below the header that are all scrollable (not just a single SliverList)

@LongCatIsLooong
Copy link
Contributor

For future reference: we decided to implement a SliverScrollbar because it's hard to retrieve some metrics from outside of the viewport. For example if there's a persistent header sliver, detecting the amount of scroll extent it is blocking (which may change as the viewport scrolls) is tricky from outside.
A SliverScrollbar that takes a single sliver child should be able to get its own maxPaintExtent and paintExtent etc. easily.

One thing that makes the SliverScrollbar not as useful as it could be currently is that we do not have a "multi sliver adaptor sliver" kind of thing available in the framework right now. For example, putting a CupertinoSliverRefreshControl and a SliverMultiboxAdaptor in a SliverScrollbar would be impossible because it can't take more than one child. /cc @Piinks

@edwardez
Copy link

SO cross-link:
https://stackoverflow.com/questions/56640482/how-to-show-scrollbar-in-sliverlist

I'm wondering is there a workaround for this issue(maybe even in some hacky way)?

@VladyslavBondarenko VladyslavBondarenko added the customer: crowd Affects or could affect many people, though not necessarily a specific customer. label Mar 24, 2020
@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label May 29, 2020
@LongCatIsLooong LongCatIsLooong modified the milestones: [DEPRECATED] Goals, 1.24 - October 2020 Jun 10, 2020
@LongCatIsLooong LongCatIsLooong removed their assignment Jun 19, 2020
@adeolaex
Copy link

Any update on this ?

@xster
Copy link
Member Author

xster commented Oct 13, 2020

@LongCatIsLooong I remember you started working on the sliver part. Did you have a draft PR or notes from your previous try?

@LongCatIsLooong
Copy link
Contributor

@xster no unfortunately.

@krll-kov
Copy link

krll-kov commented Jul 5, 2021

Any progress?

@goderbauer
Copy link
Member

Also somewhat relevant for #87370 to avoid drawing the scrollbar on top of pinned header rows, for example.

@Piinks Piinks self-assigned this Aug 16, 2021
@Piinks Piinks added P1 High-priority issues at the top of the work list and removed P2 Important issues not at the top of the work list labels Sep 14, 2021
@CavalcanteLeo
Copy link

any progress?

@Piinks
Copy link
Contributor

Piinks commented Mar 8, 2022

I have a proposal for this that should be up for review this week.
I just noticed this is also something the MaterialBanner would want to support. Currently it would overlap a SliverAppBar, just like a Scrollbar does. I need to test this new use case to make sure it works too before pushing the changes.
I'll probably land the ability to surface this information to these widgets, and then update each widget in a separate follow up change.

@Piinks
Copy link
Contributor

Piinks commented Jul 8, 2022

Closing this to consolidate in #107322
In researching a solution, I found a pattern of the same issue across multiple widgets in the framework. There is a full list in that tracking issue, including scrollbars.

I have a proposed solution in #107182 that will fix this consistently across all affected parts of the framework. That PR will be split up into multiple PRs to address each widget that needs this fix, just finishing the many test cases now. Please continue to follow in #107322, I expect all of thees changes to be landing soon.

@Piinks Piinks closed this as completed Jul 8, 2022
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability customer: crowd Affects or could affect many people, though not necessarily a specific customer. customer: money (g3) f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P1 High-priority issues at the top of the work list
Projects
None yet
Development

Successfully merging a pull request may close this issue.