Defect #32156

No left padding for first level entries in discussion board list

Added by Anonymous over 1 year ago. Updated 30 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:4.2.0
Resolution: Affected version:

Description

The left padding of the table rows is hard-coded to create a tree structure through indentation. The current solution is unfortunate as it adds no padding to the first level (level-0) but overrides padding rules from table.list td in the CSS stylesheet. Because of this it is very difficult to fix this flaw in themes. It also makes customization nearly impossible without touching the code.

boards-padding.png (3.16 KB) Anonymous, 2019-09-27 05:57

remove-hardcoded-style-padding-boards-index.patch Magnifier (537 Bytes) Anonymous, 2019-09-27 06:06

remove-hardcoded-style-padding-boards-index-v2.patch Magnifier (602 Bytes) Anonymous, 2019-09-27 07:16

discussion_boards_bad_padding.png (5.83 KB) Bernhard Rohloff, 2021-01-26 10:41

fix_left_padding_of_board_table.diff Magnifier - Replaces padding-left with text-indent (852 Bytes) Bernhard Rohloff, 2021-01-26 10:45

second-line-is-not-indented.png (51.8 KB) Go MAEDA, 2021-01-29 10:14

forums_indentation_like_on_projects_list.diff Magnifier (3.4 KB) Bernhard Rohloff, 2021-02-01 18:01

consistent_indentation_with_issues_and_projects.png (40.5 KB) Bernhard Rohloff, 2021-02-01 18:01

History

#1 Updated by Anonymous over 1 year ago

Edit: don't review it just yet, I overlooked the parent/child indentation, I will update the patch to fix this, to avoid hacky behavior like now.

#2 Updated by Anonymous over 1 year ago

Adding the fixed one now :)
Edit: actually, I already came up with even better alternative for this, and it could be bare CSS indentation with minor changes to the view, I'll post another version some time next week.

#3 Updated by Bernhard Rohloff about 1 month ago

I changed the tracker and description of the issue to clarify the problem and to make clear that this is a bug, not a feature.

The prior patches have the disadvantage, that it's still not easy to change the table padding in this view. I've attached a new patch which replaces the padding-left property with the, in this case, more appropriate text-indent property. The padding is now consistent with the other list views and can be modified in themes.

It's a paper-cut and I think we can easily fix it in 4.2.0, can't we?

#4 Updated by Go MAEDA about 1 month ago

Thank you for posting the patch but I found a UI issue caused by 'text-indent'.

When the board description is very long, the second line is not indented.

#5 Updated by Bernhard Rohloff 30 days ago

Go MAEDA wrote:

Thank you for posting the patch but I found a UI issue caused by 'text-indent'.

When the board description is very long, the second line is not indented.

Thank you Go for pointing it out. That really doesn't look right. I took a second look on the problem. Right now, we have two different approaches to show indentation in a table cell. In the projects and issues table it's solved by adding CSS classes. It's in my opinion the proper solution because it doesn't use inline styles at all. The downside is, that it's not dynamically calculated and therefore the levels of indentation have to be covered in the CSS stylesheet. The current styles cover structures which can be up to 9 layers deep. That should be more than enough in nearly all cases. I also like the additional arrow which is a common symbol for nested structures across the application.

Attached is another patch which implements this indentation method for the forum index view. I also cleaned up the indentation styles for issues and projects lists to make them less specific to this sorts of tables.

Also available in: Atom PDF