#3616 (card display mode)
by tonis · in Developers · assigned to Sharif Mehedi
Summary
New display mode for an actor. Cards, like summary, but rather then rendering the whole table, you define the rendering of each item in the table. And react deals with the internals.
[url www.primefaces.org/primereact/showcase/#/dataview The Dataview] component in PR seems to be a good starting point.
It uses a renderer function, but we store the rendered html in the data list and return it there. Should work.
However I wonder if we should have the rendered view actually be a virtual field or display field ... Would make it somewhat easer to get the data out. But then there's the issue of it being rendered all the time for tables with * in the column names....
Children
Comments
- 5 years, 6 months ago by Sharif Mehedi about #3616 (card display mode) : Yes, let's have such a session tomorrow morning.
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : We should now have an interactive brainstorming session to decide where to evolve next.
- 5 years, 6 months ago by Sharif Mehedi about #3616 (card display mode) : I did separate display_mode button considering, we need DataTable for admin users with writing privilege and DataView for users with only read privilege, who won't have write privilege (so no need for DataTable there), and in DataView they can switch between list_view or card_view. And of course we c...
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : Cool! great! So we have now three different display modes for a table view: grid, cards and list. There should be a set of three radio buttons so that users can intuitively switch between these three modes. The application developer gives the default in display_mode.
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : If you can get cards to work without touching the existing system for transferring metadata, then it's great. We have #4102 for reviewing the site metadata. Let's say that the "done indicator" for this ticket (#3616) is that the cards display mode works for tickets, comments and contacts.
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : The DOMException indicates that we are storing too much redundant information into the data structure.
- 5 years, 6 months ago by Sharif Mehedi about #3616 (card display mode) : And with old build_js_cache (from react.renderer.py) card_layout is already available in the react.
- 5 years, 6 months ago by Sharif Mehedi about #3616 (card display mode) : Writing all actor data in a single file lino_???_??.json raises the exception: Uncaught (in promise) DOMException: The quota has been exceeded. It seems the size of this file exceeds the browser storage limit. and can not be used with browser storage.
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : I did a series of small changes to lino because I think that we should use overview instead of detail_layout as default value for card_layout. But that question must wait until the card layout works also for other models than Tickets. I also added a simple card_layout to contacts.Persons and contact...
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) : Tonis, Sharif and I are wondering why the cards layout works only for tickets on Jane, but not for comments.
- 5 years, 6 months ago by Sharif Mehedi about #3616 (card display mode) : Primereact DataView has two display modes, list and card. I also had it in mind work on DataView after figuring out them bugs.
- 5 years, 6 months ago by Luc Saffre about #3616 (card display mode) (1 reply) : The cards display mode is something Charles is waiting for. It is important also for Shop to make it more mobile friendly. And it is visible in Jane.
- 6 years, 5 months ago by tonis about #3616 (card display mode) : I think comments slave table in tickets needs to have another param value of Has_parrents. Or ideally, the simple relation param value, should have a choice is_blank... that would be more ideal. Going to create a ticket for it.
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Refactord the rendering of linoGrid header. Made it have a detail header and main header function. Also a simple detail header function, which will be used for coments panel. Also made paginator to be not rendered if no data. Also new actor att paginator template, which is passed to PR to contro...
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Fixed recursive bug and limited recusion to the first level of children comments.
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Good progress. Almost a way that I think if publishable to jane. I want it so the commentsByComments slave table is also rendered in a card view, rather than just text. However there's a bug and design flaw that needs working out. Design flaw is it can become a resursive mess of endless rendering of...
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Looked through the Store code, trying to figure out best way to introduce new layouts. Think have a have a generator that returns str : value pairs for each layout an actor has. There's also a some getter functions that arn't used anywhere... thinking perhaps can do some refactoring...
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Been thinking through the card system. While it's nice to be able to reuse the data values from the grid there's always the chance that the card layout will require data that's not on the list.
Thinking the ApiList view should accept a layout option, which would then return the data for layout, ra... - 6 years, 5 months ago by tonis about #3616 (card display mode) : Also it's working assuming the actor has a detail view, it'll crash otherwise. Be warned, but here's no tables with default other than grid, so it's OIK.
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Pushed, there's a new button. There's some major caviot that the detail can only show data that's inside the table originally. Slave summarires aren't showing. Might be a good idea to have a detail view for each layouts, but that's going to be a lot of requests too... Lets expriment with this and se...
- 6 years, 5 months ago by tonis about #3616 (card display mode) : Basically at a point where I could publish to Hobbit. However I see luc has been doing changes for noi. Going to hold off the update until I have time to deal with possible data migrations. Need to also define some card layouts.
- 6 years, 5 months ago by Luc Saffre in reply to tonis about #3616 (card display mode) : Regarding the button for switching : i'd opt for a button in the toolbar. But I never understood why we have two of them, one with the quicksearch field and three buttons, the other with the remaining buttons. I'd suggest to have only one toolbar. Maybe one day we will want to add more layout and/or...
- 6 years, 5 months ago by tonis about #3616 (card display mode) (1 reply) : Got a prototype working showing a list of detail views. Might want to define a default layout of some sort. as a lot of tables don't have a detail. Looks good,but requires some CSS work and a button for switching.
Have to pause for now, will try to get a working button on Hobbit by Monday I t hi... - 6 years, 5 months ago by Luc Saffre in reply to tonis about #3616 (card display mode) : Sounds great! Wishing you inspiration and success!
- 6 years, 5 months ago by tonis about #3616 (card display mode) (2 replies) : Think I've figured out a way to structure the react code...
Rather than rewriting all the same fetching code from LinoGrid, I'm going to expand LinoGrid. (And perhaps refactor after) New prop/state layout. [table | grid | list] Defauilt is table, what we have. Grid and list are modes which will s...