material icon indicating copy to clipboard operation
material copied to clipboard

Expand card, inbox style

Open ehajredini opened this issue 11 years ago • 20 comments

Is there any possibility to expand card on click like inbox.google.com, for example

ehajredini avatar Jan 08 '15 13:01 ehajredini

At the moment, unfortunately no. Duplicate of #1100.

PaulMougel avatar Jan 08 '15 14:01 PaulMougel

you can see there my temporary solution.. iv'e changed it a little since then to act a bit different.. I'm sure soon enough this will be included.

EladBezalel avatar Jan 08 '15 18:01 EladBezalel

@EladBezalel Thank you. I've seen your solution in Plunker. What have you changed from there ? Did you published the changes anywhere ?

ehajredini avatar Jan 09 '15 14:01 ehajredini

@ehajredini sure :smile: I'll update my plunker soon.. I'll let you know!

EladBezalel avatar Jan 09 '15 16:01 EladBezalel

@ehajredini Updated! you can review here

EladBezalel avatar Jan 09 '15 17:01 EladBezalel

@EladBezalel Thank you!

ehajredini avatar Jan 10 '15 21:01 ehajredini

Sure :grin:

EladBezalel avatar Jan 10 '15 22:01 EladBezalel

@EladBezalel :+1:

demisx avatar Jan 11 '15 18:01 demisx

@ehajredini i think you can close this

EladBezalel avatar Jan 11 '15 19:01 EladBezalel

@EladBezalel I am not sure if this is the right place to discuss, i apologize in advance for that. Please post a reference to the right place to post such comments.

I really liked your solution, but I can see one missing feature i.e. the active element top offset. Here is what I am talking about:

  1. Open any of the card.
  2. Scroll so that the second item is at the top position of the page.
  3. Click on second item.
  4. The top area scrolls up and is no more visible and only the end part of the current card is visible.
  5. Is there anyway we can handle this offset issue.

One more question, why your solution does not make use of the card directive anywhere?

ivks avatar Apr 15 '15 05:04 ivks

@ivks feel free to discuss this issue where ever you want :) I am very happy that you liked my solution!

The scenario you've talked about is not possible with this kind of implementation. There is no way to achieve this with css only, to create a 'scroll to item' you need to use javascript therefore a directive for this expandable list. I have (in a closed network) a directive implementation of this but not with the suggested feature. Also this kind of directive is hard to achieve because the multiple parts of the item (header, description, contact etc..) and a complicated transclution need to be done (I used ng-multi-transclude)
It is possible but I think the angular-material team should lead this or at least start this effort.

About the card directive, I didn't used it because the current card directive is not suitable for the expandable list because it has padding and card should never be close to one another, so I used more basic directive..

Feel free to ask more if you'd like! Thanks again :)

EladBezalel avatar Apr 15 '15 08:04 EladBezalel

@EladBezalel Thank you so much for your detailed explanation. whatever I wanted to know has been answered. :+1: Thanks again.

ivks avatar Apr 16 '15 05:04 ivks

hey, has the @EladBezalel solution been included in any way? Would this work with the card directive?

marco-silva0000 avatar Jul 05 '16 17:07 marco-silva0000

@Bakirelived this was never intended to be included in ngMaterial, This feature is very user specific therefore i'd suggest you to try and implement it by your-self

EladBezalel avatar Jul 05 '16 21:07 EladBezalel

@EladBezalel Hey, did you by any chance continue with the example you posted a couple of months ago? Specifically I'm using md-data-table and would like to achieve the Google Inbox effect of having a table row expand into a card.

Got any tips/examples that could help me on my way?

zegerhoogeboom avatar Oct 17 '16 17:10 zegerhoogeboom

Actually yeah, i have it totally reworked with cool animations and auto height but it's on an offline network..

Nothing in particular, just try to keep it simple and think of all your usages ahead.. Also try to develop it as components and in the angular2 way.. this will work for you the best

EladBezalel avatar Oct 17 '16 17:10 EladBezalel

@EladBezalel Thanks, by it being on an "offline network" I suppose you mean it's also proprietary? Posting an example could help me and perhaps many more people :). And my requirements are basically everything from Inbox. Like having a list with selectable items, expand on selection and all of that.

If you aren't able to post an example (maybe later) then still thanks for the reply!

zegerhoogeboom avatar Oct 17 '16 19:10 zegerhoogeboom

@zegerhoogeboom I'd probably export it at some point, hope it will be sooner than later! :)

EladBezalel avatar Oct 17 '16 19:10 EladBezalel

@EladBezalel Cool, @zegerhoogeboom me when you do would be great!

zegerhoogeboom avatar Oct 17 '16 19:10 zegerhoogeboom

@EladBezalel that export would be great ;) meanwhile I was trying to work based on your plnkr, but I think it's broken...

marco-silva0000 avatar Nov 10 '16 12:11 marco-silva0000