Opened 5 months ago
Last modified 3 months ago
#22965 assigned enhancement
Change Recent Comments Number Input to type="number"
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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)
Change History (14)
comment:1
SergeyBiryukov — 5 months ago
- 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
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
.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):
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.


Patch for both dashboard recent comments and main widget