Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Issue 2713033003: Print Preview: Show error message if text is typed in Copies section (Closed)

Created:
3 years, 10 months ago by rbpotter
Modified:
3 years, 9 months ago
Reviewers:
dpapad
CC:
arv+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Print Preview: Show error message if text is typed in Copies section Native number input type returns an empty string for the current value if it is invalid (non-numeric). Change to show an error message if this happens. Previously did not show an error message in this case as the old text input field would return the text in the field rather than an empty string. Also: - fix both copies and scaling handling of scientific notation. - remove regex parsing and use native input error checking BUG=693493 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2713033003 Cr-Commit-Position: refs/heads/master@{#453661} Committed: https://chromium.googlesource.com/chromium/src/+/c1d9ece59f24058d02965208c692c4204dcef799

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add logic to deal with scientific notation #

Patch Set 3 : Remove unnecessary diff #

Total comments: 9

Patch Set 4 : Address comments, remove unused constants #

Patch Set 5 : Use valueAsNumber instead of Number ToFixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -97 lines) Patch
M chrome/browser/resources/print_preview/data/ticket_items/copies.js View 1 2 3 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/resources/print_preview/data/ticket_items/scaling.js View 1 2 3 1 chunk +2 lines, -28 lines 0 comments Download
M chrome/browser/resources/print_preview/settings/copies_settings.js View 1 2 3 4 3 chunks +17 lines, -16 lines 0 comments Download
M chrome/browser/resources/print_preview/settings/scaling_settings.js View 1 2 3 4 6 chunks +41 lines, -44 lines 0 comments Download

Messages

Total messages: 34 (24 generated)
rbpotter
3 years, 10 months ago (2017-02-24 03:18:20 UTC) #6
dpapad
https://codereview.chromium.org/2713033003/diff/1/chrome/browser/resources/print_preview/data/ticket_items/copies.js File chrome/browser/resources/print_preview/data/ticket_items/copies.js (right): https://codereview.chromium.org/2713033003/diff/1/chrome/browser/resources/print_preview/data/ticket_items/copies.js#newcode30 chrome/browser/resources/print_preview/data/ticket_items/copies.js:30: if (/[^\d]+/.test(value)) { Nit (optional): Maybe combine the two ...
3 years, 9 months ago (2017-02-24 20:35:36 UTC) #9
rbpotter
Removed regex error handling and used input error checking. Also made changes to allow scientific ...
3 years, 9 months ago (2017-02-25 04:51:51 UTC) #14
dpapad
https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/data/ticket_items/copies.js File chrome/browser/resources/print_preview/data/ticket_items/copies.js (right): https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/data/ticket_items/copies.js#newcode37 chrome/browser/resources/print_preview/data/ticket_items/copies.js:37: if (this.getValue() == '') Nit (optional) var value = ...
3 years, 9 months ago (2017-02-27 21:56:02 UTC) #17
rbpotter
https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/data/ticket_items/copies.js File chrome/browser/resources/print_preview/data/ticket_items/copies.js (right): https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/data/ticket_items/copies.js#newcode37 chrome/browser/resources/print_preview/data/ticket_items/copies.js:37: if (this.getValue() == '') On 2017/02/27 21:56:02, dpapad wrote: ...
3 years, 9 months ago (2017-02-28 00:12:59 UTC) #20
dpapad
https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/settings/scaling_settings.js File chrome/browser/resources/print_preview/settings/scaling_settings.js (right): https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/settings/scaling_settings.js#newcode221 chrome/browser/resources/print_preview/settings/scaling_settings.js:221: if (Number(this.inputField_.value).toFixed(0) === Is the change from parseInt() to ...
3 years, 9 months ago (2017-02-28 00:36:42 UTC) #21
rbpotter
https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/settings/scaling_settings.js File chrome/browser/resources/print_preview/settings/scaling_settings.js (right): https://codereview.chromium.org/2713033003/diff/40001/chrome/browser/resources/print_preview/settings/scaling_settings.js#newcode221 chrome/browser/resources/print_preview/settings/scaling_settings.js:221: if (Number(this.inputField_.value).toFixed(0) === On 2017/02/28 00:36:42, dpapad wrote: > ...
3 years, 9 months ago (2017-02-28 02:34:05 UTC) #24
dpapad
lgtm
3 years, 9 months ago (2017-02-28 18:27:58 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2713033003/80001
3 years, 9 months ago (2017-02-28 19:18:52 UTC) #31
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 19:25:33 UTC) #34
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/c1d9ece59f24058d02965208c692...

Powered by Google App Engine
This is Rietveld 408576698