Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#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:

  1. I think the fieldsets looks prettier without the border when it's folded.
  2. 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)

hidden_filters_for_saved_queries-r6391.diff (1.4 KB ) - added by Christian Boos 17 years ago.
The proposed changes

Download all attachments as: .zip

Change History (6)

by Christian Boos, 17 years ago

The proposed changes

comment:1 by Christian Boos, 17 years ago

Owner: changed from Matthew Good to Christian Boos
Status: newassigned

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

     
    1414          $("#groupdesc").enable(this.selectedIndex != 0)
    1515        }).change();
    1616        $("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");
    1720        /* Hide the columns by default. */
    1821        $("#columns").toggleClass("collapsed");
    1922      });
  • trac/htdocs/css/report.css

     
    2020#query { clear: right }
    2121#query fieldset, #query fieldset input, #query fieldset select { font-size: 11px }
    2222#query fieldset { margin-top: 1em }
     23#query fieldset.collapsed { border-width: 0 }
    2324#query .option, #query .option input, #query .option select { font-size: 11px }
    2425#query .option { float: left; line-height: 2em; margin: .9em 2.5em 0 .5em; padding: 0 0 .1em }
    2526#query .buttons { float: right; margin-top: .5em }
     
    114115  vertical-align: middle;
    115116  text-align: center;
    116117  font-size: 85%;
    117 }
    118  No newline at end of file
     118}

comment:2 by Christian Boos, 17 years ago

Keywords: review added

comment:3 by conny@…, 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 Christian Boos, 17 years ago

Resolution: fixed
Status: assignedclosed

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.

comment:5 by Christian Boos, 17 years ago

Read r6569 in the above instead of r6559. Also, reduce the amount of vertical space in r6621.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.