consolidate checks of numeric fields in Account manager

ASSIGNED
Assigned to

Status

MailNews Core
Account Manager
--
enhancement
ASSIGNED
6 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

(Depends on: 1 bug, Blocks: 1 bug, {polish, ux-error-prevention})

Trunk
polish, ux-error-prevention
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

6 years ago
+++ This bug was initially created as a clone of Bug #532391 comment 2 +++

There are several pairs of fields of the pattern: checkbox and numeric field.
The numeric field is only enabled when the checkbox is enabled.
Examples of such pair is the "check for new messages every X minutes" or "ask me before downloading X messages". Some of the fields have some checks whether the entered value is correct and within sane boundaries. Some of the fields do not have such check.
The purpose of this bug is to build a shared set of checks and add the checks where they are missing.

The proposed model of operation for those fields:
- the numeric fields will have 'type="number" size="X" min="X" increment="X"' as appropriate. This makes the widget itself sanitize values read from prefs.js into the specified boundaries. It does not allow the user to input values outside the boundaries. It adds the small arrow widgets to increase/decrease the value.
- the checkbox field will have an oncommand function that will enable/disable the corresponding numeric field depending on the state of the checkbox.

Open questions:
- should 0 still be allowed in some fields as a special value? It was used to disable the checkbox automatically if 0 is entered (in "Check for new messages every X days").
- should max= attribute be added to the numeric fields to disallow some insane values? Like 10000000 minutes? It would need decision what are insane values and whether the backend would choke on them.

The plan:
- merge the onCheckItem function from am-server.js and am-offline.js and move it into amUtils.js .
- update the field declarations where needed and make them call the onCheckItem function.
- the fields where these checks need update are for example:
a) RSS "Check for new articles every X minutes"
b) POP3/News (Synch & storage) "Messages larger than X KB"
c) POP3/News (Synch & storage) "Messages more than X days old"
d) Junk mail "automatically delete junk mail older than X days"
etc.
(Assignee)

Updated

6 years ago
Blocks: 729147
(Assignee)

Updated

6 years ago
Blocks: 755454
(Assignee)

Updated

6 years ago
No longer blocks: 755454
Depends on: 755454
(Assignee)

Comment 1

6 years ago
The common function was moved to am-prefs.js per comment
https://bugzilla.mozilla.org/show_bug.cgi?id=755454#c4.

The resulting patch from all this would be too big so I am doing some panels in separate bugs (linked here).
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Depends on: 755518
(Assignee)

Updated

6 years ago
Depends on: 755885
(Assignee)

Updated

6 years ago
Depends on: 755898

Updated

6 years ago
No longer depends on: 755898
(Assignee)

Updated

6 years ago
Depends on: 755898
(Assignee)

Updated

5 years ago
Blocks: 755898
Depends on: 725488
No longer depends on: 755898
(Assignee)

Updated

5 years ago
No longer blocks: 729147
You need to log in before you can comment on or make changes to this bug.