Last Comment Bug 773565 - GCLI Autocomplete goes wild when boolean params are used in a group
: GCLI Autocomplete goes wild when boolean params are used in a group
Status: RESOLVED FIXED
[gclicommands][fixed-in-fx-team]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: unspecified
: All All
: P1 normal (vote)
: Firefox 17
Assigned To: Joe Walker [:jwalker] (needinfo me or ping on irc)
:
: Brian Grinstead [:bgrins]
Mentors:
Depends on:
Blocks: 770830 660765 GCLICMD 774238
  Show dependency treegraph
 
Reported: 2012-07-13 01:49 PDT by Michael Ratcliffe [:miker] [:mratcliffe]
Modified: 2012-08-25 17:01 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (91.13 KB, patch)
2012-08-02 12:56 PDT, Joe Walker [:jwalker] (needinfo me or ping on irc)
dcamp: review+
Details | Diff | Splinter Review
v2 (210.03 KB, patch)
2012-08-24 03:11 PDT, Joe Walker [:jwalker] (needinfo me or ping on irc)
mratcliffe: review+
Details | Diff | Splinter Review

Description Michael Ratcliffe [:miker] [:mratcliffe] 2012-07-13 01:49:59 PDT
GCLI Autocomplete goes wild when boolean params are used in a group:

1. Install the patch from bug 769560
2. Type the following:
   jsb http://code.jquery.com/jquery-1.7.2.min.js --jslintHappy
3. Press space and you get the completion for braceStyle.
4. Add --braceStyle and choose collapse from the popup and it overwrites braceStyle
Comment 1 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-07-16 07:21:45 PDT
Triage, filter on TEABAGS
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-08-02 12:56:58 PDT
Created attachment 648452 [details] [diff] [review]
v1

a.k.a https://github.com/campd/gcli/pull/57
Comment 3 Michael Ratcliffe [:miker] [:mratcliffe] 2012-08-13 09:36:32 PDT
Joe said that if we add the following to OutputPanel.prototype.update = function OP_update():

if (this.displayedOutput.data.completed) {
  // Hide progress
} else {
  // Show progress
}

Here is a complete(ish) progress implementation from elsewhere:
OutputView.prototype.changed = function(ev) {
  var document = this.elems.rowout.ownerDocument;
  var duration = this.outputData.duration != null ?
          'completed in ' + (this.outputData.duration / 1000) + ' sec ' :
          '';
  duration = document.createTextNode(duration);
  this.elems.duration.appendChild(duration);

  if (this.outputData.completed) {
    this.elems.prompt.classList.add('gcli-row-complete');
  }
  if (this.outputData.error) {
    this.elems.prompt.classList.add('gcli-row-error');
  }

  this.outputData.toDom(this.elems.rowout);

  // We need to see the output of the latest command entered
  // Certain browsers have a bug such that scrollHeight is too small
  // when content does not fill the client area of the element
  var scrollHeight = Math.max(this.outputTerminal.element.scrollHeight,
      this.outputTerminal.element.clientHeight);
  this.outputTerminal.element.scrollTop =
      scrollHeight - this.outputTerminal.element.clientHeight;

  this.elems.throb.style.display = this.outputData.completed ? 'none' : 'block';
};
Comment 4 Michael Ratcliffe [:miker] [:mratcliffe] 2012-08-13 09:38:44 PDT
Ignore my previous comment, wrong bug.
Comment 5 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-08-24 03:11:36 PDT
Created attachment 654968 [details] [diff] [review]
v2

rebase and update tests to suite in gcli
Comment 6 Michael Ratcliffe [:miker] [:mratcliffe] 2012-08-24 03:49:26 PDT
Comment on attachment 654968 [details] [diff] [review]
v2

Review of attachment 654968 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/commandline/CmdJsb.jsm
@@ +118,5 @@
> +        if (xhr.status == 200 || xhr.status == 0) {
> +          let browserDoc = context.environment.chromeDocument;
> +          let browserWindow = browserDoc.defaultView;
> +          let browser = browserWindow.gBrowser;
> +  

Trailing space
Comment 7 Rob Campbell [:rc] (:robcee) 2012-08-24 06:31:40 PDT
Backed out in:

https://hg.mozilla.org/integration/fx-team/rev/f4596ef17eed
Comment 8 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-08-24 11:16:04 PDT
Re-land
https://tbpl.mozilla.org/?tree=Fx-Team&rev=c80d0e010be3
Comment 9 Dave Camp (:dcamp) 2012-08-25 17:00:02 PDT
https://hg.mozilla.org/mozilla-central/rev/35e5ee61e193
Comment 10 Dave Camp (:dcamp) 2012-08-25 17:01:45 PDT
https://hg.mozilla.org/mozilla-central/rev/c80d0e010be3 was the relanded changeset.

Note You need to log in before you can comment on or make changes to this bug.