#5703 (Review the display_mode API specs)
by Luc Saffre · in Developers · assigned to Luc Saffre
Kokkuvõte
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
- #5757 (Review the display_mode selection buttons) (by Luc Saffre in Developers assigned to Luc Saffre)
Kommentaarid
- 2 aastat 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 aastat 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 aastat 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 aastat 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 aastat 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 aastat 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 aastat, 1 kuu 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 aastat, 1 kuu 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 aastat, 2 kuud ago by Luc Saffre about #5703 (Review the display_mode API specs) : Created new Ticket #5703 (Review the display_mode API specs).