#6674 closed enhancement (fixed)
Hidden fieldsets for custom queries
Reported by: | Christian Boos | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | report system | Version: | 0.11b1 |
Severity: | minor | Keywords: | query review |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
This is a small cosmetic improvement to the display of fieldsets for custom queries:
- I think the fieldsets looks prettier without the border when it's folded.
- For saved queries, I think it's better if the filters fieldset is hidden by default. Indeed, the saved queries can have a pretty long list of conditions, and a short description can often describe the query in a more concise way than a raw list of filters.
As those are cosmetic and UI changes, I ask for some feedback first.
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | hidden_filters_for_saved_queries-r6391.diff added |
---|
comment:1 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Whoops, the patch ends with a \ No newline at end of file
, which messes up the patch formatter in 0.10.x.
Here's the content (for some reason the enscript fallback works in the wiki but not in the attachment view - 0.10 quirks, nevermind):
-
trac/ticket/templates/query.html
14 14 $("#groupdesc").enable(this.selectedIndex != 0) 15 15 }).change(); 16 16 $("fieldset legend").enableFolding(false); 17 /* Hide the filters for saved queries. */ 18 if ( window.location.href.search(/[?&]report=[0-9]+/) != -1 ) 19 $("#filters").toggleClass("collapsed"); 17 20 /* Hide the columns by default. */ 18 21 $("#columns").toggleClass("collapsed"); 19 22 }); -
trac/htdocs/css/report.css
20 20 #query { clear: right } 21 21 #query fieldset, #query fieldset input, #query fieldset select { font-size: 11px } 22 22 #query fieldset { margin-top: 1em } 23 #query fieldset.collapsed { border-width: 0 } 23 24 #query .option, #query .option input, #query .option select { font-size: 11px } 24 25 #query .option { float: left; line-height: 2em; margin: .9em 2.5em 0 .5em; padding: 0 0 .1em } 25 26 #query .buttons { float: right; margin-top: .5em } … … 114 115 vertical-align: middle; 115 116 text-align: center; 116 117 font-size: 85%; 117 } 118 No newline at end of file 118 }
comment:2 by , 17 years ago
Keywords: | review added |
---|
comment:3 by , 17 years ago
Perhaps we should instead locate all fieldsets on the page and per default collapse them, when in reports and/or query mode. That way other plugins that provice query options. (I'm primarily thinking of th:BatchModifyPlugin.)
Add an option under [query]
, "always_collapse" that defaults to true, and in addition to that allow one to override that setting on the query string (...&collapse=false
).
The motivation for this would be
- You could still keep the current behaviour
- When you go to /query, you can choose to always have the fieldsets hidden and use a
default_query
if you always end up using the same query most of the time anyway - When you link to the query module you can have more control over the presentation (you might want to send query links to colleagues that despise enormous HTML forms)
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Above patch applied in r6559 and r6570.
As for the request to hide all fieldsets, well, that's outside of the scope of the ticket which was really focusing on what you see first when viewing a saved query.
All I wanted is to get something quite similar to what a regular (sql) report looked like: a brief description of the report and the list of tickets. The filters just went in the way.
For other fieldsets, like those added by plugins, I think it's up to their authors to decide whether they should be initially presented collapsed or not.
The proposed changes