Ticket #9825 (closed enhancement: fixed)
Opened 19 months ago
Last modified 17 months ago
Stabilize report column sizes
| Reported by: | dirkjan@… | Owned by: | rblank |
|---|---|---|---|
| Priority: | low | Milestone: | 0.12.2 |
| Component: | report system | Version: | 0.12.1 |
| Severity: | minor | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
Report column sizes are not fixed, meaning that column sizes depend on contents of the tables. This results in columns jumping around when browsing from report to report. While it cannot be fixed for all cases (because some reports show different columns than other reports), it would be nice if reports showing the same columns had stable column sizes, so that browsing is less jumpy.
Attachments
Change History
comment:1 Changed 19 months ago by rblank
Changed 18 months ago by rblank
- Attachment 9825-stable-columns-r10369.patch added
Align columns across groups in query and report results.
comment:2 Changed 18 months ago by rblank
I hate XTHML.
I had a nice, clean patch for this ticket, up until I tried validating the result. That's when I learned that even though XHTML allows multiple <tbody> sections in a table, it only allows a single <thead> section. So I had to replace the <thead> sections with <tbody>, which makes this quite a hack.
The major advantage of 9825-stable-columns-r10369.patch is that the result looks much, much cleaner than before (patch against 0.12-stable, BTW). The layout has been checked on all the major browsers.
The drawback is that the table semantics are messed up. This has one immediate effect: when printing a ticket query, the column headers aren't repeated at the top of each page. I haven't found any other issues so far.
So at this point, I'm unsure whether this should go in or not. I do like the straight layout very much, but it feels wrong to mess up the table semantics. Feedback would be appreciated.
comment:3 Changed 18 months ago by cboos
The result is very nice indeed, so it seems worth making an extra effort/complication to fix the little glitch with <thead>. Doing a proof of concept for query_results.html (as it's late ;-) ).
Changed 18 months ago by cboos
- Attachment 9825-thead-for-query_results.patch added
Add <thead> once for the first group (applies on attachment:9825-stable-columns-r10369.patch)
comment:4 Changed 18 months ago by cboos
(would be worth to put the <h2> in another py:def as well)
Changed 18 months ago by cboos
- Attachment 9825-thead-for-query_results.2.patch added
cleaned up version of the previous patch
Changed 18 months ago by cboos
- Attachment 9825-thead-for-report_view.patch added
Same trick applied to the report_view.html template
comment:5 Changed 18 months ago by rblank
I also thought about putting the first set of headers into a <thead>, but I didn't want the group header to be repeated at the top of each page. I didn't think of putting the first group header outside of the table, a very nice idea indeed!
The table semantics are still a bit messed up, as intermediate headers appear in <tbody>, but I also feel the improved layout is worth it. Thanks for the feedback!
Changed 17 months ago by rblank
- Attachment 9825-stable-columns-r10378.patch added
Full patch with fix for empty group labels in reports.
comment:6 Changed 17 months ago by rblank
9825-stable-columns-r10378.patch is the full patch, with an additional fix in the case where a group label in a report is empty. The result looks good on all major browsers, so unless something else pops up, I'm going to commit this shortly.
comment:7 follow-up: ↓ 10 Changed 17 months ago by cboos
Please commit, I'll then add an additional check for empty row_group, which can trigger an "index out of range" error in some circumstances (problem already present in current code).
comment:8 Changed 17 months ago by rblank
Patch committed in [10384]. I'll leave the ticket open for your fix.
comment:9 Changed 17 months ago by thijstriemstra
- Owner changed from rblank to cboos
comment:10 in reply to: ↑ 7 Changed 17 months ago by cboos
- Component changed from ticket system to report system
- Resolution set to fixed
- Status changed from new to closed
Little fix added in r10389. I verified that the custom query view was not subjected to the same problem.
comment:11 Changed 17 months ago by cboos
- Owner changed from cboos to rblank
Ownership back to Remy.



I'm not sure we can do anything sensible to have fixed column sizes between reports, but we could at least start with having consistent column sizes between groups in a single report.