Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

display: grid #512

Closed
macjohnny opened this issue Nov 23, 2017 · 7 comments · Fixed by #712
Closed

display: grid #512

macjohnny opened this issue Nov 23, 2017 · 7 comments · Fixed by #712
Assignees
Labels
feature has pr A PR has been created to address this issue P5 Low-priority issue that needs consideration

Comments

@macjohnny
Copy link

macjohnny commented Nov 23, 2017

Bug, feature request, or proposal:

Feature request

What is the expected behavior?

It would be nice to have to possibility to choose between using display: flex and display: grid for building layouts.
The flex-layout library could be copied to allow using all features like the responsive API, etc.

This could either fit into flex-layout itself or be provided as a new package, e.g. grid-layout.

I could imagine directives to be used like this:

<div fxGridLayout="1fr 1fr 1fr 2fr">
  <div></div>
  <div></div> 
  <div></div>
  <div fxGridRow="span 2"></div>
  <div fxGridColumn="span 2"></div>
  <div></div>
</div>

grid-layout

See https://www.w3.org/TR/css-grid-1 and https://css-tricks.com/snippets/css/complete-guide-grid/
and https://www.youtube.com/watch?v=txZq7Laz7_4

This feature would allow to dynamically arrange the items in the grid areas, depending on the viewport size, without having to copy / move the actual items in the DOM tree.

@ThomasBurleson
Copy link
Contributor

We have plans to add CSS Grid APIs to flex-layout... perhaps the combined library will be called @angular/ui-layout; but that is TBD.

@ThomasBurleson ThomasBurleson added feature P5 Low-priority issue that needs consideration labels Nov 28, 2017
@ThomasBurleson ThomasBurleson added this to the Backlog milestone Nov 28, 2017
@melroy89
Copy link

melroy89 commented Mar 16, 2018

I really would like to see this indeed! Any updates so far?

@CaerusKaru
Copy link
Member

The updates are that this is something we're looking into, but it's not a priority right now. It would need a lot of design work before we could get started. Any discussion about desired features would help and should be posted here.

@kylecordes
Copy link

@CaerusKaru Is there any interest in a "make Grid convenient in Angular" library, being separate from the "make Flex convenient in Angular" library? Having them together seems to add complexity in development, adoption, documentation, etc.; and doing them separately seems more modular.

@CaerusKaru
Copy link
Member

CaerusKaru commented Mar 16, 2018

@kylecordes The current idea is that they would be separate modules in the same package, as @ThomasBurleson alluded to above, something like
import {FlexModule, GridModule} from '@angular/layout';.

The reasoning is that these libraries will need to share the same common utilities like the MediaQuery engine and setting custom breakpoints. Testing is also going to be the same across both.

As for documentation, we're planning on switching to Dgeni at some point in the future, which will allow us to seamlessly create docs from the TS source itself.

@kylecordes
Copy link

@CaerusKaru Thank you, that is very useful, really looking forward to it. This is a common thing that developer coming to the Angular world ask for - "official" tools to do layout.

@CaerusKaru CaerusKaru modified the milestones: Backlog, v6.0.0-beta.16 Apr 14, 2018
@CaerusKaru CaerusKaru self-assigned this Apr 14, 2018
@CaerusKaru CaerusKaru added the has pr A PR has been created to address this issue label Apr 14, 2018
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature has pr A PR has been created to address this issue P5 Low-priority issue that needs consideration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants