Flex-layout: discussion: should Flex Layout depend on the CDK?

Created on 13 Feb 2018  路  8Comments  路  Source: angular/flex-layout

This issue tracks the possibility of adding the Angular CDK as a direct/peer dependency for Flex Layout. This would mean that like @angular/core and @angular/common, @angular/cdk would need to be installed for Flex Layout to function properly.

This would allow us to move several utilities like the Media Query engine and the BiDirectionality module back into the CDK and focus on creating a smooth set of utilities for layout configuration.

Please feel free to add comments to this issue, but avoid generic "+1" or "-1" comments. Please use Emoji responses on the issue or individual comments instead.

discussion material2

Most helpful comment

The counterpoint to the above is that Flex Layout (and Grid Layout if we ever get around to that) adds a lot of complexity -- more than the CDK should reasonably have for a subcomponent.

The way I prefer to think of this library is more akin to @angular/animations, with various directives and extended functionality, but still dependent on other libraries (@angular/platform-browser for animations, and cdk for us).

I'd like to set for the record that this repo _might_ move into the material2 repo as a "monorepo" setup, even without adding the dependency. And the release schedule is definitely something we're looking at, even without adding the direct dependency/moving the repo.

All 8 comments

I think we should move this repo into @angular/cdk/layout, like @angular/cdk/layout/flex, @angular/cdk/layout/grid.
Benefit:
1/ We can move our docs into material cdk guides then instead of build our own document page.
2/ Attract more users and contributors
3/ Align with @angular/material, @angular/cdk in every release.

The counterpoint to the above is that Flex Layout (and Grid Layout if we ever get around to that) adds a lot of complexity -- more than the CDK should reasonably have for a subcomponent.

The way I prefer to think of this library is more akin to @angular/animations, with various directives and extended functionality, but still dependent on other libraries (@angular/platform-browser for animations, and cdk for us).

I'd like to set for the record that this repo _might_ move into the material2 repo as a "monorepo" setup, even without adding the dependency. And the release schedule is definitely something we're looking at, even without adding the direct dependency/moving the repo.

Looking at the @angular/material README.md, it seems like this repository covers the layout part of @angular/material, but other then that they don't seem to be related.
The version and the schedule is different and the documentation is not part of material.angular.io.
This somehow confuses me as a user, so I think moving this repo into the @angular/material repo (maybe as a module like @angular/cdk) and syncing the releases would be a good decision.

As of #631, Flex Layout now has a peer dependency on the CDK. Thank you all for your feedback and support!

The material way to handle breakpoints is abit more extensive than flexlayouts... Will the two be more similar in the future? Eg in flexlayout it's not possible to target mobile orientations

@mackelito That's currently possible with our implementation, you just need to provide the ORIENTATION_BREAKPOINTS as a custom provider in your app.

We'll be looking at ways to either bring the CDK Layout ending up to speed with Flex Layout or vice version, but for now we'll be sticking with our implementation. The peer dependency allows us to use the CDK BiDi module without cloning.

True that.. I was thinking about the static API 馃榿

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings