Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 3 years ago

#9065 closed enhancement (fixed)

show "You may use WikiFormatting here" for new tickets too

Reported by: Vaclav Slavik <vslavik@…> Owned by: Vaclav Slavik <vslavik@…>
Priority: normal Milestone: 0.12
Component: ticket system Version: 0.12dev
Severity: normal Keywords:
Cc: ryano@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

0.12 has "You may use WikiFormatting here" well visible at the right side of wikitoolbar when adding a comment to a ticket. But it has no such hint on the description field when creating a new ticket, which is often user's first encounter with Trac and its syntax.

This patch adds such link there too.

The CSS parts are needed, too. Without them, this hint would be misaligned. ticket.css code makes me believe that the intention was for the description <textarea> to be 100% wide, but the code didn't actually do it. I changed it to use 100%, which in turn aligned the textarea nicely with the help label.

Removal of #newticket rules is intentional: they appear to be some leftover that wasn't used even in 0.11 anymore.

Attachments (4)

newticket-formatting-help.patch (1.5 KB ) - added by Vaclav Slavik <vslavik@…> 15 years ago.
newticket-formatting-help.2.patch (1.9 KB ) - added by Christian Boos 15 years ago.
fixes a few issues with the first patch (see comment:1)
dont-use-label.patch (796 bytes ) - added by Vaclav Slavik <vslavik@…> 15 years ago.
fixes use of label for help text
table-padding.patch (2.0 KB ) - added by Vaclav Slavik <vslavik@…> 15 years ago.
fix alignment and add table padding

Download all attachments as: .zip

Change History (14)

by Vaclav Slavik <vslavik@…>, 15 years ago

comment:1 by Christian Boos, 15 years ago

Thanks for the patch!

However, there were several issues:

  • you need to always put the content of a <textarea> at the beginning of a line (#7657)
  • the width at 100% doesn't look good, a little margin on the right looks nicer
  • the for= attribute was missing on the label

Please try the revised version and tell me what you think.

by Christian Boos, 15 years ago

fixes a few issues with the first patch (see comment:1)

comment:2 by Christian Boos, 15 years ago

Milestone: 0.12

Btw, I'm not sure the <fieldset class="iefix"> stuff is really (still) needed, but I think it's better to be consistent with what we do in the other places until we decide to remove that.

And the s/div#/#/ changes are just clean-ups in passing ;-)

comment:3 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

Your patch applied in r9205 and my tweaks to it in r9206. If you want to suggest some further changes, you're welcome to do so.

in reply to:  1 comment:4 by Vaclav Slavik <vslavik@…>, 15 years ago

Replying to cboos:

  • the width at 100% doesn't look good, a little margin on the right looks nicer

The trouble is that using 99% makes the "You may use WikiFormatting here." text misaligned again, the "e." part (or so) is not over the textarea anymore, it's to the right of it. It would be much better to add some (0.5-1em) padding to 100% width instead.

This was a bit difficult, but it turned out there already should be such padding, but got lost in some changes. Specifically, there's a bunch of table.properties rules in CSS, but the table doesn't have this ID anymore. I replaced these with #properties table selector and added 0.5em padding to the table (something that is done for #properties — it used to apply to the table in the past).

I'll attach a patch with these changes. I think it does the right thing: there's enough padding (which could be tweaked easily) and help text is aligned well.

  • the for= attribute was missing on the label

Sorry about that. I removed it intentionally, because field-description already has a label associated (the "Description:" text), but I wasn't thinking: I shouldn't have used <label> in the first place. I'm attaching a patch to that effect too.

by Vaclav Slavik <vslavik@…>, 15 years ago

Attachment: dont-use-label.patch added

fixes use of label for help text

by Vaclav Slavik <vslavik@…>, 15 years ago

Attachment: table-padding.patch added

fix alignment and add table padding

comment:5 by Vaclav Slavik <vslavik@…>, 15 years ago

Resolution: fixed
Status: closedreopened

comment:6 by Christian Boos, 15 years ago

dont-use-label.patch: I don't see the need to remove the extra label:

More than one LABEL may be associated with the same control by creating multiple references via the for attribute. http://www.w3.org/TR/html401/interact/forms.html#edef-LABEL

Clicking on the "here" leads you to the textarea below, which is nice.

table-padding.patch: #ticket table.properties is used for the layout of the ticket box in already created tickets! But the other changes in your patch do the job:

  • trac/htdocs/css/ticket.css

     
    88}
    99
    1010#field-description-help { float: right }
    11 #properties div.trac-resizable, #field-description { width: 99% }
     11#properties div.trac-resizable, #field-description { width: 100% }
    1212
    1313#ticket {
    1414 background: #ffd;
     
    120120form .field div.trac-resizable { width: 100% }
    121121
    122122#properties { white-space: nowrap; line-height: 160%; padding: .5em }
    123 #properties table { border-spacing: 0; width: 100%; }
     123#properties table { border-spacing: 0; width: 100%; padding: 0 .5em }
    124124#properties table th {
    125125 padding: .4em;
    126126 text-align: right;

in reply to:  6 comment:7 by Vaclav Slavik <vslavik@…>, 15 years ago

Replying to cboos:

Clicking on the "here" leads you to the textarea below, which is nice.

My thinking was that it's not semantically a label for this field, but you have a point.

#ticket table.properties is used for the layout of the ticket box in already created tickets!

I see, I didn't realize this.

comment:8 by Ryan Ollos <ryano@…>, 15 years ago

Cc: ryano@… added

comment:9 by Christian Boos, 15 years ago

Resolution: fixed
Status: reopenedclosed

Patch from comment:6 committed as r9234.

comment:10 by Christian Boos, 15 years ago

Owner: set to Vaclav Slavik <vslavik@…>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Vaclav Slavik <vslavik@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Vaclav Slavik <vslavik@…> 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.