Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

[v2] Rewrite Layout without mdlUpgrade #295

Closed
tleunen opened this issue Apr 18, 2016 · 3 comments
Closed

[v2] Rewrite Layout without mdlUpgrade #295

tleunen opened this issue Apr 18, 2016 · 3 comments
Milestone

Comments

@tleunen
Copy link
Owner

tleunen commented Apr 18, 2016

The Layout component is probably the biggest and the most complicated component in the material design lite library at the moment.
We should remove the need of the mdlUpgrade function on the Layout, and add what's needed for each component to be fully controlled with props.

@tleunen tleunen added this to the 2.0 milestone Apr 18, 2016
@Download
Copy link
Contributor

Download commented Apr 21, 2016

I've been thinking about this one a lot. My app has 2 drawers, one on the left hand side and one on the right. MDL's Layout component is a pain in this regard because it assumes you may have a left drawer but never a right one. I ended up using my own drawer component that is fully controlled.

Personally, I think in React MDL, the Layout should be much simpler. It shouldn't make so many assumptions about the components that can be nested inside it as it does now.

E.g.

<Layout fixedDrawer>
        <Drawer title="Title">

The fixedDrawer attribute is misplaced IMHO. It should have been:

<Layout>
        <Drawer fixed title="Title">

What do you think about this? Any plans to make such more structural changes?

Personally, I think we should have a close look at what shapes and forms the 'AppBar' can take and implement just that part separately. As I said I am using my own drawer in my app and I am just ignoring the built-in behavior of Layout and I don't really see any disadvantages. It makes life much simpler actually.

@tleunen
Copy link
Owner Author

tleunen commented Apr 21, 2016

It's definitely the way to go, but it can be hard to achieve now with the current css. mdl-layout--fixed-drawer is applied on the layout, not on the drawer :s

@Download
Copy link
Contributor

Yeah I know. But honestly, the whole fixed thing isn't working very well i.c.w. React. Because they have all these responsive style rules that have a big impact on the structure.

Are you in contact with them for their v2? I think they could use the feedback of where we have problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants