Opened 5 months ago

Last modified 3 months ago

#22965 assigned enhancement

Change Recent Comments Number Input to type="number"

Reported by: mordauk Owned by: helen
Priority: normal Milestone: 3.6
Component: Administration Version: 3.5
Severity: normal Keywords: has-patch ui-focus
Cc:

Description

In order to be consistent with the rest of the dashboard, the "Number of comments to show:" input field in the Recent Comments widget should be changed to type="number" in order to add the up/down arrows.

Attachments (5)

recent_comments_number_field.patch (1.6 KB) - added by mordauk 5 months ago.
Patch for both dashboard recent comments and main widget
dashboard_comments_number.patch (807 bytes) - added by mordauk 5 months ago.
Updates type to "number" and adds step and min attributes. Changes class to small-text
recent_comments_number.patch (924 bytes) - added by mordauk 5 months ago.
Changes type to number and adds min / step attributes.
22965.diff (2.1 KB) - added by helen 5 months ago.
22965.1.diff (2.4 KB) - added by obenland 6 weeks ago.
Refresh of Helen's patch. Additionally aligns the number selector vertically.

Download all attachments as: .zip

Change History (14)

Patch for both dashboard recent comments and main widget

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 3.6
  • Cc dev-reviewed added
  • Owner set to helen
  • Status changed from new to assigned
  • Cc dev-reviewed removed
  • Keywords dev-reviewed added

Also to be consistent, these should probably have min and step attributes specified - 1 for both, seems like. 0 on the Dashboard tells you there are no comments yet, and 0 in the widget just gets you the default of 5.

Updates type to "number" and adds step and min attributes. Changes class to small-text

Changes type to number and adds min / step attributes.

helen5 months ago

.small-text on the widgets one makes the input just wide enough to push to a second line, at least on OSX in English. Not the end of the world, but wondering if maybe we should create a .tiny-text class? Would be something like 22965.diff.

I'm all for a new .tiny-text class. The small-text class has always seemed just a little too large for input fields that will never (in all sane applications) go over two digits.

2 quick comments on 22965.diff​:

1) Having the input push to a new line doesn't seem worth fixing to me, as the title field just above wraps to a new line as well. It looks almost more uniform to me on a new line. Also, even with a new .tiny-text class, won't it still likely wrap for some translations?

2) The padding for the number selector looks off (not sure we can do anything about that):

http://f.cl.ly/items/3t33341m1V060b2P2x0r/number-type-padding.jpg

I'm not nearly as concerned about the pushing to a new line so much as just providing more generic classes for general use. Not pushing to a new line in this instance would be good to keep it looking the same way it does now, but more of a bonus than a necessity.

  • Keywords ui-focus added; dev-reviewed removed

Refresh of Helen's patch. Additionally aligns the number selector vertically.

Note: See TracTickets for help on using tickets.