GCLI command parameters could use more advanced validation. Experiment.

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
7 years ago
2 months ago

People

(Reporter: jwalker, Unassigned)

Tracking

Trunk
Future

Firefox Tracking Flags

(Not tracked)

Details

Sometimes parameters need specific validation which can't be performed by the type system.

$ example --verbose --quiet

Another example could be resource names which are un-enumerable, and yet validatable.

If would be nice if we could add custom validation to be performed by the command line before the command is invoked for real.
The given example "--verbose --quiet" isn't great because we might be able to do better with "--output [verbose|quiet|default]" or similar.

This observation does not invalidate this bug however - there are times when more complex validation is needed.

The observation does point out that there are times when we can alter the command syntax to provide the same results without needing to write extra code.
See bug 683513
Blocks: 659052
No longer blocks: 642229
Moving GCLI bugs to Developer Tools: Console. Filter on 'baked beans are off'.
Component: Developer Tools → Developer Tools: Console
Triage. Filter on PEGASUS.
Priority: -- → P3
No longer blocks: 659052
Target Milestone: --- → Firefox 17
Triage, filter on TEABAGS
Target Milestone: Firefox 17 → Future
One more case where validation would be required:

screenshot command has 2 options 'chrome' and 'selector'

chrome enables chrome screenshot capturing rather than content; And selector lets us choose a node via its unique selector (#id.class)

when you do simply 

>> screenshot --selector h1.img

it takes screnshot of the image that is h1

but when you try to do the following:

>> screenshot --chrome --selector h1.img

the context of the selector should now be switched to chrome, so that I could do this:

>> screenshot --chrome --selector #webConsole

where #webConsole is a XUL element.

but right now what happens is that 'selector' option still tries to find the node in content context and there is no way to get the selector to match a chrome/XUL node.
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Component: Developer Tools: Console → Developer Tools: Graphic Commandline and Toolbar
Resetting priorities because these P* levels are very out of date.
Sorry for the bug spam. Filter on Lobster Thermidor
Priority: P3 → --
Triage. Filter on Lobster Thermidor.
Nice idea, but no need to keep on file.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX

Updated

2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.