WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 2 months ago

#22965 assigned enhancement

Change Recent Comments Number Input to type="number"

Reported by: mordauk Owned by: helen
Milestone: Future Release Priority: normal
Severity: normal Version: 3.5
Component: Comments Keywords: has-patch
Focuses: ui, administration 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 16 months ago.
Patch for both dashboard recent comments and main widget
dashboard_comments_number.patch (807 bytes) - added by mordauk 16 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 16 months ago.
Changes type to number and adds min / step attributes.
22965.diff (2.1 KB) - added by helen 16 months ago.
22965.1.diff (2.4 KB) - added by obenland 12 months ago.
Refresh of Helen's patch. Additionally aligns the number selector vertically.

Download all attachments as: .zip

Change History (16)

mordauk16 months ago

Patch for both dashboard recent comments and main widget

comment:1 SergeyBiryukov16 months ago

  • Component changed from General to Administration
  • Milestone changed from Awaiting Review to 3.6

comment:2 nacin16 months ago

  • Cc dev-reviewed added
  • Owner set to helen
  • Status changed from new to assigned

comment:3 nacin16 months ago

  • Cc dev-reviewed removed
  • Keywords dev-reviewed added

comment:4 helen16 months ago

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.

mordauk16 months ago

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

mordauk16 months ago

Changes type to number and adds min / step attributes.

helen16 months ago

comment:5 helen16 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.

comment:6 mordauk16 months ago

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.

comment:7 lessbloat16 months ago

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

comment:8 helen14 months ago

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.

comment:9 helen14 months ago

  • Keywords ui-focus added; dev-reviewed removed

obenland12 months ago

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

comment:10 ryan10 months ago

  • Milestone changed from 3.6 to Future Release

comment:11 jeremyfelt2 months ago

  • Component changed from Administration to Comments
  • Focuses admin added
Note: See TracTickets for help on using tickets.