website icon indicating copy to clipboard operation
website copied to clipboard

Add library of slivers to the website

Open Piinks opened this issue 1 year ago • 11 comments

It would be really great if slivers were more discoverable for developers. Recently in conversation I wished we had a central place where they are listed (and link to the API docs) so folks can peruse all of the available slivers.

Related: https://github.com/flutter/website/issues/8434

Piinks avatar Mar 10 '23 22:03 Piinks

It would be really greta...

great* 😅

Juliotati avatar Mar 12 '23 15:03 Juliotati

It looks like we currently have a catalog of sliver widgets as a subcategory of layout widgets. It might be slightly outdated currently though.

Perhaps it could become it's own top-level category or we could make it more prominent in another way.

There are future goals to improve and overhaul the widget catalog, including a possible filter/search mechanism, so there are other potential options to consider too.

\cc @InMatrix Who I believe has been looking into the widget catalog a bit. Do you see any ways we can make this more discoverable?

parlough avatar Mar 24 '23 21:03 parlough

I'm not sure about making sliver widgets a top-level category, which should be considered when we have time to update the widget catalog systematically. For now, would the Scrolling page in the widget catalog be a better home for slivers than the Layout page?

InMatrix avatar Mar 24 '23 21:03 InMatrix

I believe the current catalog might support including the same subcategory in multiple categories as well, so it could potentially go in both without much extra work.

parlough avatar Mar 24 '23 22:03 parlough

I love the idea of adding it to the scrolling category. In the short term, should we just add a new slivers page? That works, too.

sfshaza2 avatar Mar 29 '23 22:03 sfshaza2

In either case, we need to come up with a description to explain what slivers are, since I believe that's a Flutter-specific term. We also need to replace as many placeholder thumbnail images with animated demos such as the one in https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html.

InMatrix avatar Mar 31 '23 23:03 InMatrix

Currently there is the Using slivers to achieve fancy scrolling page (which will hopefully very soon not be hidden under Advanced UI).

It describes slivers as:

A sliver is a portion of a scrollable area that you can define to behave in a special way. You can use slivers to achieve custom scrolling effects, such as elastic scrolling.

Other than, the page relies heavily on videos. It would be nice to introduce some textual content as well, especially since slivers may have evolved since the creation of some of them.

parlough avatar Mar 31 '23 23:03 parlough

Yes, also Kate Lovett made a GREAT workshop on slivers a couple years back. I updated the page at the time: https://docs.flutter.dev/development/ui/advanced/slivers

Though I see that Craig has a new video, too.

sfshaza2 avatar Apr 03 '23 17:04 sfshaza2

under Advanced UI

Just adding more context, the goal here (and for much of the Scrolling Performance Pitfalls Project) is to dispel the concept that slivers are just for advanced UIs. They just have lots of possibilities. :)

Often we have seen developers shy away from them and instead make poor performance decisions because they feel slivers are intimidating, or what they are trying to build is not some crazy complicated composition.

Slivers don't need to be complicated, they can be really simple. So we filed this issue and included it in the project to see if we can make them more accessible for folks that don't know what is available.

Piinks avatar Apr 04 '23 22:04 Piinks

Yes, as part of our information architecture restructuring (which Parker is working on right now), we are removing the advanced section (not the content, but the section). Slivers won't be under "advanced" anymore. :D

sfshaza2 avatar Apr 06 '23 00:04 sfshaza2

We surely shouldn't forget the newer Slivers in the catalog (SliverMain|CrossAxisGroup, DecoratedSliver, SliverExpanded, ...) as these are relatively new (but very welcome!) additions, that unfortunately lack some mentions in the documentation.

navaronbracke avatar Dec 07 '23 12:12 navaronbracke