Closed Bug 773565 Opened 12 years ago Closed 12 years ago

GCLI Autocomplete goes wild when boolean params are used in a group

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: miker, Assigned: jwalker)

References

Details

(Whiteboard: [gclicommands][fixed-in-fx-team])

Attachments

(1 file, 1 obsolete file)

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
Blocks: 774238
No longer blocks: 769560
Triage, filter on TEABAGS
Component: Developer Tools → Developer Tools: Console
Priority: -- → P1
Target Milestone: --- → Firefox 17
Blocks: 770830
Assignee: nobody → jwalker
Status: NEW → ASSIGNED
Blocks: 660765
Attached patch v1 (obsolete) — Splinter Review
a.k.a https://github.com/campd/gcli/pull/57
Attachment #648452 - Flags: review?(dcamp)
Attachment #648452 - Flags: review?(dcamp) → review+
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';
};
Assignee: jwalker → mratcliffe
Ignore my previous comment, wrong bug.
Assignee: mratcliffe → jwalker
Attached patch v2Splinter Review
rebase and update tests to suite in gcli
Attachment #648452 - Attachment is obsolete: true
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
Attachment #654968 - Flags: review+
Re-land
https://tbpl.mozilla.org/?tree=Fx-Team&rev=c80d0e010be3
Whiteboard: [gclicommands] → [gclicommands][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/35e5ee61e193
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: