Closed
Bug 866680
Opened 11 years ago
Closed 11 years ago
gcli string params should allow empty values.
Categories
(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: mgoodwin, Assigned: jwalker)
Details
Attachments
(1 file, 1 obsolete file)
11.77 KB,
patch
|
harth
:
review+
mgoodwin
:
feedback+
|
Details | Diff | Splinter Review |
Issue: I'm working on a gcli command for which a string parameter defaults to a non empty value, but for which an empty string should be valid. gcli apparently does not allow an empty value to be specified by the user. STR: This behaviour can be seen with the 'cookie set' built in command. Try to set a cookie with an empty path: 1) Type 'cookie set foo bar --path ""' 2) Observe the help text in the command bar displaying '<string> [option]' 3) Press enter; observe the helper baloon showing the text "The path of the cookie to set".
Assignee | ||
Comment 1•11 years ago
|
||
There are many cases where a string is required and a blank won't do (for example the "context <name>" command) so we need to provide for the "empty string is invalid" case too. The question is should we make the cookie command say { name: "path", type: { name: "string", allowBlank: true }, ... }, Or should the context command say: { name: "name", type: { name: "string", forceValue: true }, ... }, I think there are 2 reasons to prefer allowBlank: true 1. It doesn't change the current default 2. Having defaultValue: '' does nearly the same thing, allowing the user to not type a value. This is only an issue where there is a string where blank is valid, but there is a non-blank defaultValue
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #749169 -
Flags: feedback?(mgoodwin)
Assignee | ||
Comment 3•11 years ago
|
||
For detail on the commits, see the last to entries here: https://github.com/joewalker/gcli/commits/allowblank-866680
Assignee | ||
Comment 4•11 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=c43423192a7b
Assignee | ||
Comment 5•11 years ago
|
||
Rebase
Attachment #749169 -
Attachment is obsolete: true
Attachment #749169 -
Flags: feedback?(mgoodwin)
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 750415 [details] [diff] [review] v2 mgoodwin raised this bug as part of creating security commands, so I've f?ed him. harth would probably be glad of mgoodwin's f+ before her review.
Attachment #750415 -
Flags: review?(fayearthur)
Attachment #750415 -
Flags: feedback?(mgoodwin)
Reporter | ||
Comment 7•11 years ago
|
||
Comment on attachment 750415 [details] [diff] [review] v2 Review of attachment 750415 [details] [diff] [review]: ----------------------------------------------------------------- Looks OK to me.
Attachment #750415 -
Flags: feedback?(mgoodwin) → feedback+
Updated•11 years ago
|
Attachment #750415 -
Flags: review?(fayearthur) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Fx-Team&rev=6cf5ac92530b https://hg.mozilla.org/integration/fx-team/rev/97892f7b402a
Whiteboard: [fixed-in-fx-team]
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/97892f7b402a
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•