◄ ► | Edit | Home | Admin | en de fr et | Sign in

#4229 (Default item_layout)

by Luc Saffre · in Developers · assigned to Sharif Mehedi

Summary

Children

Comments

  • 5 years, 3 months ago by Sharif Mehedi about #4229 (Default item_layout) : I suppose we won't have to invoke Model.list_item() since we mostly collect them by other means such as using getattr.
  • 5 years, 3 months ago by Sharif Mehedi about #4229 (Default item_layout) : Lino returns {card_title: "some title"} and nothing more when we use item_layout. As I understand list_item is a virtual field on Model. but we are never invoking and Model.list_item() to get the value.
  • 5 years, 3 months ago by Sharif Mehedi in reply to Luc Saffre about #4229 (Default item_layout) : Actually no, this was not due to the new styling. I just figured it out and it seems that it needs some work.
  • 5 years, 3 months ago by Sharif Mehedi in reply to Luc Saffre about #4229 (Default item_layout) : I found only two failures related to a print statement. I guess you already have fixed them.
  • 5 years, 3 months ago by Sharif Mehedi in reply to Luc Saffre about #4229 (Default item_layout) : this is due to the new styling in the dangerouslySetInnerHTML. I am not sure whether to keep it or discard it.
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) (2 replies) : The test failures are fixed, I committed my work. There is still a problem: e.g. in amici1 log in as robin and open the list of persons, switch to list view. It still seems to use the card_layout (but unlike in card view every records takes the whole width).
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) (1 reply) : There are still some subtle failures in the book tests after my changes.
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) : The "overview" field is not a perfect default value for the item_layout (which is used by the "list" display mode, a misnomer that lead to our typo bug in LinoComponents.js) because the "overview" field is meant to be used inside a detail layout or as the default for cards.
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) : Now I need to explore and meditate whether "overview" is actually what we want as default value.
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) : Cool! Yes, that was the problem!
  • 5 years, 3 months ago by Sharif Mehedi about #4229 (Default item_layout) : It's on this line of code: gitlab.com/lino-framework/react/-/blob/master/lino_react/react/components/LinoToolbar.js#L82 . It's looking for list_layout, and we are calling it item_layout now. So if you just change this from list_layout to item_layout, it should work fine.
  • 5 years, 3 months ago by Luc Saffre about #4229 (Default item_layout) : I now managed that all actors have a default item_layout that shows the overview. (Actually it is not on all actors, only almost all, that was the tricky part). But the fourth button in the right side of the toolbar still doesn't appear. Is it possible that this button isn't yet implemented in the r...