Issue 11485

Title
more-cell does not have the right width (no colspan)
Priority
bug
Status
resolved
Nosy list
ced, reviewbot, roundup-bot, rvalery
Assigned to
rvalery
Keywords
backport, review

Created on 2022-05-13.18:27:39 by rvalery, last changed 3 days ago by ced.

Messages

New changeset 33fa924d6cb2 by Cédric Krier in branch 'default':
Ensure more-cell always have a colspan attribute
https://hg.tryton.org/tryton-env/rev/33fa924d6cb2
New changeset 00b685811e6d by Raphaël Valéry in branch 'default':
Ensure more-cell always have a colspan attribute
https://hg.tryton.org/sao/rev/00b685811e6d
Author: [hidden] (rvalery)
Date: 2022-05-15.01:47:36

It should be good now.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-05-13.23:46:16

Your patch is based on tryton-env instead of sao.
But any way when the patch is only for one repository, it is better to upload from this repository because it is simpler for the maintainer.

Author: [hidden] (rvalery)
Date: 2022-05-13.19:31:40

Apparently my patch is not applicable but I don't know why.

Author: [hidden] (rvalery)
Date: 2022-05-13.18:27:38

In SAO, long list displays a more-row (tr), containing a more-cell (td), with a more button. The more-cell is supposed to have a colspan="number_of_visible_columns", but it does not.
As a result, the more-cell has the same width as the first column containing checkboxes to select each row. And the more button does not have enough space to be displayed correctly.

Apart from the visual aspect, it has an annoying consequence on list with lots of columns, when a horizontal scrollbar is displayed. If the list is scrolled horizontally, and the first column is not visible, then the list won't load more items when scrolling to the bottom of the list. Since the first column and the more button is not visible, the IntersectionObserver defined in tree.js will never detect that we have reach the bottom of the list, and won't call the callback to trigger the click on more-button.

In tree.js, in function Sao.View.tree::display(), we normally execute this line :
this.tbody.find('tr.more-row > td').attr(
'colspan', visible_columns);

But since the rows are added to tbody after being rendered to minimize browser reflow, more-row does not exists when we try to add the colspan attribute.

History
Date User Action Args
2022-05-19 22:19:31cedsetkeyword: + backport
2022-05-19 22:19:15roundup-botsetmessages: + msg76742
2022-05-19 22:19:12roundup-botsetmessages: + msg76741
nosy: + roundup-bot
status: testing -> resolved
2022-05-15 01:59:36reviewbotsetmessages: + msg76657
2022-05-15 01:47:36rvalerysetmessages: + msg76656
2022-05-13 23:46:23cedsetstatus: in-progress -> testing
type: behavior
2022-05-13 23:46:16cedsetmessages: + msg76635
nosy: + ced
2022-05-13 23:45:05cedsettitle: sao: more-cell does not have the right width (no colspan) -> more-cell does not have the right width (no colspan)
2022-05-13 19:31:40rvalerysetmessages: + msg76632
2022-05-13 19:29:48reviewbotsetmessages: + msg76631

Showing 10 items. Show all history (warning: this could be VERY long)