#9065 closed enhancement (fixed)
show "You may use WikiFormatting here" for new tickets too
Reported by: | Owned by: | ||
---|---|---|---|
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)
Change History (14)
by , 15 years ago
Attachment: | newticket-formatting-help.patch added |
---|
follow-up: 4 comment:1 by , 15 years ago
by , 15 years ago
Attachment: | newticket-formatting-help.2.patch added |
---|
fixes a few issues with the first patch (see comment:1)
comment:2 by , 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 , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 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.
comment:5 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 7 comment:6 by , 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
8 8 } 9 9 10 10 #field-description-help { float: right } 11 #properties div.trac-resizable, #field-description { width: 99% }11 #properties div.trac-resizable, #field-description { width: 100% } 12 12 13 13 #ticket { 14 14 background: #ffd; … … 120 120 form .field div.trac-resizable { width: 100% } 121 121 122 122 #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 } 124 124 #properties table th { 125 125 padding: .4em; 126 126 text-align: right;
comment:7 by , 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 , 15 years ago
Cc: | added |
---|
comment:9 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:10 by , 15 years ago
Owner: | set to |
---|
Thanks for the patch!
However, there were several issues:
for=
attribute was missing on the labelPlease try the revised version and tell me what you think.