Closed Bug 988268 Opened 6 years ago Closed 6 years ago

[Cost Control] "When use is above" parameter is set to '0' the red line appearing at the top of the graphic

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(b2g-v2.0 fixed)

VERIFIED FIXED
2.0 S1 (9may)
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: lolimartinezcr, Assigned: mai)

References

Details

(Whiteboard: burirun1.4-2, OpenCrun1.4-3)

Attachments

(2 files)

Attached image 2014-03-25-09-31-44.png
1.4
Platform version: 30.0a2
Build ID: 20140325101236
Git commit: b09bf796
Reproducible: 100%

STR:
1) Tap Usage aplication
2) Tap Setting button
3) Set "0" in "When use is above"
4) Tap "Done"

Actual result:
Line red is show (See attached image) not in 0

Expected result:
Graphics is correctly shown
Whiteboard: burirun1.4-2
Summary: [Graphic] When in "When use is above" has '0' amount in graphic you can see a red line → [Cost Control] When in"When use is above" has '0' amount in graphic you can see a red line
Hi,

Just adding that same behavior is seen in today's (3/26) master and v1.3 builds:

Master
Device:hamachi
BuildId: 20140326065930
Gecko: 618b2c2
Gaia: 0c9701c
Platform version: 31.0a1

v1.3:
Device:hamachi
BuildId: 20140326055947
Gecko: 6a9a53d
Gaia: 812838a
Platform version: 28.0

It doesn't make a lot of sense to allow setting '0' value as data usage limit, we should avoid it. Asking for UX input here, Ayman wdyt?
Assignee: nobody → mri
Flags: needinfo?(aymanmaat)
Summary: [Cost Control] When in"When use is above" has '0' amount in graphic you can see a red line → [Cost Control] "When use is above" parameter is set to '0' the red line appearing at the top of the graphic
ok I agree with Noemi and the developers that allowing the user to set a value limit of ‘0’ makes no sense. Discussions lead me to conclude that the minimum value a user should be able to input is: 0.01 

We need a mechanism that communicates to the user that the current value input is either valid or invalid and for that I think for the sake of constancy we will use the pattern that is implemented on the cash balance alert indicator under: 

Usage App > settings > Balance ‘when balance is below’.

Therefore the specified behaviour should be as follows:

1) field empty
      field border	= red error treatment
      field fill 	= red error treatment
      done CTA		= disabled

2) 0 (zero) in field
      field border		= red error treatment
      field fill 		= red error treatment
      done CTA		= disabled

3) 0.0 (zero dot zero) in field
      field border		= red error treatment
      field fill 		= red error treatment
      done CTA		= disabled

4) 0.01 (zero dot zero one) or greater value in field
      field border	= normal treatment
      field fill 	= normal treatment
      done CTA		= enabled

Please remember to limit the amounts of decimal points (dots) ‘.’ that can be input into the field to one and not to allow the dash ‘-‘ to be input into the field at all. if this is not possible when fixing this bug then:

5) if more than one decimal point ‘.’ is input into the field or a dash ‘-‘ is input into the field
      field border	= red error treatment
      field fill 	= red error treatment
      done CTA		= disabled

Ni? me if you require any further clarification
Flags: needinfo?(aymanmaat)
Attached file patch v1.0
Hi, 
Salva could you review this patch?

In this patch have not addressed the issue of not allowing more than one dot, because this can be a problem if the numbers are localized.
Ayman has already opened a specific bug for this ( Bug 986414 -[Cost Control] Undesirable keyboard behaviour in data usage: user can enter multiple decimal points)
Attachment #8397764 - Flags: review?(salva)
Comment on attachment 8397764 [details] [review]
patch v1.0

Ayman, do you mind giving me your feedback?
Attachment #8397764 - Flags: feedback?(aymanmaat)
Comment on attachment 8397764 [details] [review]
patch v1.0

Seems fine to me Marina. Good work.
Attachment #8397764 - Flags: feedback?(aymanmaat) → feedback+
Comment on attachment 8397764 [details] [review]
patch v1.0

Passing to José Manuel.
Attachment #8397764 - Flags: review?(salva) → review?(jmcf)
Attachment #8397764 - Flags: review?(jmcf)
I left some comments on GH. Marina, please, address them and then ask for another review

thanks!
Comment on attachment 8397764 [details] [review]
patch v1.0

Hi Jose, 
I've updated the PR with your comments. Would you mind reviewing the patch again?
Regards
Attachment #8397764 - Flags: review?(jmcf)
I've just talked to Marina and we are going to implement some enhancements (filtering out non-significative zeros), thus cancelling my review until that happens.

By the way Marina, this PR would also need some tests

thanks!
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

Updated the PR with your comments. Added some test.

Jose, would you mind reviewing the patch?

Regards
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

cancelling review as we need at least another round
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

Updated the PR with your comments.
Jose, would you mind reviewing the patch?
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

still we need another round

thanks
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

Updated the PR with the latest comments.
Attachment #8397764 - Flags: review?(jmcf)
Comment on attachment 8397764 [details] [review]
patch v1.0

r+ with a tiny comment on GH to be implemented

once solve the tiny comment and a green Travis, please land

thanks!
Attachment #8397764 - Flags: review?(jmcf) → review+
Master: e6e1da035ea6d6ca67db5a774384c55bdcaf4c5c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S1 (9may)
Duplicate of this bug: 994532
Duplicate of this bug: 986415
This bug NOT is working
Tested
Hamachi
1.4
Gecko 2f11e3a
Gaia 17fb448
Whiteboard: burirun1.4-2 → burirun1.4-2, OpenCrun1.4-3
(In reply to Loli from comment #19)
> This bug NOT is working
> Tested
> Hamachi
> 1.4
> Gecko 2f11e3a
> Gaia 17fb448

For this reason, it is reopened
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Sorry this bug is working in 2.0.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Tested and working
Hamachi
2.0
Gecko: 6558278
Gaia: b368142
Status: RESOLVED → VERIFIED
Duplicate of this bug: 982907
You need to log in before you can comment on or make changes to this bug.