#5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout)
50 · by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Not sure wheter anybody will ever use cards as they are implemented right now. But for Prima we want something similar: they want to have MyCourses rendered as "tiles".
Children
Comments
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : todo: in TextRenderer.table2story() we must test for the new display mode. (File lino/core/renderer.py line 877)
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : Right now the css style of each tile is defined in the local.css, i.e. the application developer cannot decide width or background color. Advantage of this approach is to be more efficient for the browser. Let's leave it like this until there is a concrete need for more customization.
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : I quickly had a first visible result and I think the idea is good, but I'm still fiddling with how to configure the details (width of each tile, background color, ...). Here is a local screenshot.

- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : I will try to write a tiles view for JournalsOverview because that might be good for #5876 (tim2lino bridge for Peppol).
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : The following comments were lost yesterday because I wrote them after the snapshot (because I hadn't seen Sharif's comment that he was about to upgrade Jane).
03/06/2025 15:52Luc Saffre commented on #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout): Another... - 1 year, 4 months ago by Sharif Mehedi in reply to Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : we can use "ar.actor.get_table_as_tiles" in the react views. In doing so, the pagination might break, for that, we can have get_table_as_tiles respect the pagination parameters.
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : todo: why can't I set class="l-tile" and define this in lino_react/react/config/react/local.css?
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) (1 reply) : todo: compare react.views.ApiList.get() and core.renderer.HtmlRenderer.table2story() and explain their difference and remove redundant code.
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : Now it probably works, but the CSS styling isn't yet done, and the rendering for the dashboard is defined in a different place. I'm still trying to understand.
- 1 year, 4 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : Doesn't yet work as expected.
- 1 year, 4 months ago by Sharif Mehedi about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : react now knows about the tiles display mode.
- 1 year, 5 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : I pushed my changes. Your turn now, @8lurry !
- 1 year, 5 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : I have done the Python part. @8lurry when I will have pushed my work you will be able to test it in prima1 where the dashboard renders school.MyGroups in the new display mode "tiles". But the front end doesn't yet understand "tiles". The "tiles" mode is similar to "story" or "list".
- 1 year, 5 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : I have a better idea: we leave the cards dm as it is (why throw it away) but add a new display mode "tiles".
- 1 year, 5 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : We now have a concrete use case: the MyCourses table in the dashboard of Lino Prima must use a cards layout. They asked for it. So here we go.
- 1 year, 8 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : After talking about it with @8lurry : Yes, let's replace the card_layout by as_card(). And when working on this, also think about how to configure the width of the cards (as mentioned in #5385, BUT let's wait with actually doing this until we have a concrete use case for cards. Right now they are just a ki...
- 1 year, 8 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : Add a method Model.as_card(), which default implementation returns as_paragraph().
- 1 year, 8 months ago by Luc Saffre about #5895 (Add a display mode "tiles", like cards but with custom html instead of a card_layout) : Created new Ticket #5895 (Implement cards with custom html instead of a card_layout).