material icon indicating copy to clipboard operation
material copied to clipboard

mdToolbar: Implement Flexible space with drag and animations

Open EladBezalel opened this issue 11 years ago • 41 comments

The app bar is flexible and can be extended to accommodate larger typography or images. To extend the app bar, add a flexible space block.

The Flexible space shrinks until only the navigation bar is left. The title should also shrink into place to become a 20sp title in the navigation bar. When scrolling all the way back, the flexible space and the title grow into place again. The whole app bar scrolls off. When the user reverse-scrolls, the navigation bar returns anchored to the top. When scrolling all the way back, the flexible space and the title grow into place again.

flexible space video flexible space

EladBezalel avatar Dec 26 '14 10:12 EladBezalel

+1

demisx avatar Dec 27 '14 16:12 demisx

Flexible space needs to be implemented in some other components as well. This will be an interesting one...

ajoslin avatar Jan 08 '15 14:01 ajoslin

As mentioned in #1259 - Flexible space should support the existence of tabs

scrolling techniques - patterns - google design guidelines

EladBezalel avatar Jan 23 '15 11:01 EladBezalel

Any update on when this would be implemented? the milestone is just being updated.

cskiwi avatar Jun 02 '15 09:06 cskiwi

Any update on this? It's interesting as I couldn't get to make header just like http://www.materialup.com/

infacq avatar Jun 10 '15 03:06 infacq

+1 surprised not to see more votes on this one.

brianfeister avatar Jun 19 '15 04:06 brianfeister

+1

mutp avatar Jul 06 '15 07:07 mutp

+1

TiS avatar Jul 09 '15 11:07 TiS

+1

guiporto avatar Jul 12 '15 14:07 guiporto

as @guiporto mentioned in a linked issue, this is a nice implementation: http://codepen.io/jbltx/pen/KwQxBX

EladBezalel avatar Jul 13 '15 21:07 EladBezalel

@EladBezalel - that is an excellent, very impressive demo!

scrollingheader

ThomasBurleson avatar Jul 13 '15 22:07 ThomasBurleson

+1 this is a great demo. I tried it for my project. It works good, some little issues with sidenav (generate a scroll to the top) and dialog (open from md-menu in toolbar, md-dialog open anchor like if we are on the top even if we are on the bottom of the page).

catenane200 avatar Jul 13 '15 22:07 catenane200

What would the type of toolbar in the demo be called?

Polymer has the "paper-scroll-header" https://elements.polymer-project.org/elements/paper-scroll-header-panel?view=demo:demo/index.html

Its not really a waterfall toolbar is it? https://www.google.com/design/spec/components/toolbars.html#toolbars-usage

This is the closest example I could find, but it doesn't have a name. https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQscXNQY3dNdVlYeTQ/patterns-scrolling-techniques_flex_space_image_xhdpi_003.webm

EDIT: Also I was thinking about adapting this to the coding guidelines and polishing it up a bit and submitting a pull request, but I know the contributing guidelines say you arent accepting PR's. Should I spend some time on this or not?

NickBolles avatar Jul 14 '15 04:07 NickBolles

Allright I did some work on it. I actually went a totally different route and just implimented it as attributes on the md-toolbar. Let me know what you guys think

http://nickbolles.github.io/material/dist/demos/toolbar/

The new demos are: demoScrollFade demoScrollAway demoScrollTabs (Not working yet I dont think, just threw this in at the end)

NickBolles avatar Jul 15 '15 05:07 NickBolles

Nice. Although I have to point out, that flexible space in material design is described as placed below the content (content hovers part of the flexible space). I, for instance, am most interested in this effect. It is shown in video at the bottom of spec page http://www.google.com/design/spec/patterns/scrolling-techniques.html#scrolling-techniques-scrolling

TiS avatar Jul 15 '15 08:07 TiS

@TiS I have implemented a way to overlap the content with the background image. It seems to be working pretty good and fulfill the flexible space of material design for the most part. I am going to try to complete the tests in the next day so that the PR can be reviewed and merged hopefully.

NickBolles avatar Jul 26 '15 18:07 NickBolles

+1

the-ult avatar Jul 27 '15 18:07 the-ult

+1

zwhitchcox avatar Aug 11 '15 20:08 zwhitchcox

+1!

jsenecal avatar Aug 12 '15 13:08 jsenecal

+1

alexpechkarev avatar Sep 30 '15 14:09 alexpechkarev