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

#5703 (Review the display_mode API specs)

by Luc Saffre · in Developers · assigned to Luc Saffre

Summary

Rather than specifying a tuple of 2-tuples called "display_mode", we now specify a dict called "display_rules", which maps available_width to display_mode.

Children

Comments

  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : TODO: Get rid of those long strings "constants.DISPLAY_MODEXXX" in application code. And also the dict with two keys (70 and None) is unfriendly. New attribute display_modes (with "s"), which gets validated and converted into a tuple during startup. And a simple rule that when it contains two names,...
  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : I had another idea: actually we also want a possibility to influence the display mode already on the model.
  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : The default value for default_display_modes could be more intelligent: summary for "slave" tables and "grid" or "list" for master tables.
  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : I now discovered and fixed a bug that I introduced when working on this. Context.computeDefaults() didn't select the correct display mode.
  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : I am still not sure whether my changes are ready for getting pushed. I am currently slow because I discover the jsx code while manually testing.
  • 2 years ago by Luc Saffre about #5703 (Review the display_mode API specs) : I was almost ready, the test suite passing, but then discovered another JS run-time error (LinoBody.jsx line 224 when displaying the detail of a comment).
  • 2 years, 1 month ago by Luc Saffre about #5703 (Review the display_mode API specs) : I did more code changes, added a new attribute extra_display_modes.
  • 2 years, 1 month ago by Luc Saffre about #5703 (Review the display_mode API specs) : Today I did the code changes in my local copy and it seems to work well. But there is quite some manual testing to do, and documentation to update.
  • 2 years, 2 months ago by Luc Saffre about #5703 (Review the display_mode API specs) : Created new Ticket #5703 (Review the display_mode API specs).