Commit Graph

59 Commits

Author SHA1 Message Date
Alexandre Poirot
59fe57c052 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot
a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Mark Banner
6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Nicolas Chevobbe
7ea3febf64 Bug 1492797 - Allow to pass an input to the autocomplete constructor. r=rcaliman.
This will automatically add all the necessary event listeners
for the autocomplete (navigating, selecting an item, closing).
The input will also be used as a default anchor when showing
the popup.

Differential Revision: https://phabricator.services.mozilla.com/D72859
2020-07-21 18:02:17 +00:00
Razvan Maries
b050189393 Backed out 3 changesets (bug 1492797) for perma failures on browser_editor_autocomplete_events.js. CLOSED TREE
Backed out changeset 3bfad9588f0b (bug 1492797)
Backed out changeset 3ecf0fc44704 (bug 1492797)
Backed out changeset a7f6906f69de (bug 1492797)
2020-07-21 14:26:49 +03:00
Nicolas Chevobbe
b7a30eac36 Bug 1492797 - Allow to pass an input to the autocomplete constructor. r=rcaliman.
This will automatically add all the necessary event listeners
for the autocomplete (navigating, selecting an item, closing).
The input will also be used as a default anchor when showing
the popup.

Differential Revision: https://phabricator.services.mozilla.com/D72859
2020-07-20 16:36:05 +00:00
James Teh
b05b4ac1c4 Bug 1646267: In Dev Tools autocompletes, Only rebuild the list a11y clone when the main list changes. r=nchevobbe
Previously, the list clone was completely replaced every time aria-activedescendant was set.
This caused screen readers to extraneously report this as a new list every time the user cursored to a different item, even if the items hadn't changed.

Differential Revision: https://phabricator.services.mozilla.com/D79941
2020-06-23 01:57:52 +00:00
James Teh
07134911e2 Bug 1645731: Don't expose the autocomplete popup panel as an alert for accessibility. r=nchevobbe
There was already code to do this, but it was acting on a div instead of the XUL panel.

Differential Revision: https://phabricator.services.mozilla.com/D79635
2020-06-16 06:58:12 +00:00
Nicolas Chevobbe
cdecd7e233 Bug 1609942 - Display autocomplete popup at the top of the input. r=jdescottes,Honza,perftest-reviewers,whimboo.
This prevents the popup to cover the eager evaluation result.
In order for the popup to be able to appear outside of the
toolbox, we pass the useXulWrapper option to the HTMLTooltip.

Differential Revision: https://phabricator.services.mozilla.com/D62431
2020-03-06 13:18:34 +00:00
Narcis Beleuzu
4ee0475f73 Backed out 2 changesets (bug 1616847, bug 1609942) for dt failures on browser_jsterm_autocomplete_control_space.js . CLOSED TREE
Backed out changeset c1d7d5e9a18b (bug 1609942)
Backed out changeset 7a5178ee8cd2 (bug 1616847)
2020-02-28 22:05:05 +02:00
Nicolas Chevobbe
98eaf88703 Bug 1609942 - Display autocomplete popup at the top of the input. r=jdescottes,Honza.
This prevents the popup to cover the eager evaluation result.
In order for the popup to be able to appear outside of the
toolbox, we pass the useXulWrapper option to the HTMLTooltip.

Differential Revision: https://phabricator.services.mozilla.com/D62431
2020-02-28 15:10:19 +00:00
Cosmin Sabou
3056d5d619 Backed out 2 changesets (bug 1616847, bug 1609942) for devtools failures on browser_jsterm_autocomplete_getters_cache.js.
CLOSED TREE

Backed out changeset 0ee1ac6bab06 (bug 1609942)
Backed out changeset 2357c3d7aa4a (bug 1616847)
2020-02-26 21:39:11 +02:00
Nicolas Chevobbe
8da3d5de68 Bug 1609942 - Display autocomplete popup at the top of the input. r=jdescottes,Honza.
This prevents the popup to cover the eager evaluation result.
In order for the popup to be able to appear outside of the
toolbox, we pass the useXulWrapper option to the HTMLTooltip.

Differential Revision: https://phabricator.services.mozilla.com/D62431
2020-02-26 14:46:45 +00:00
Brad Werth
d2a197b2f5 Bug 1567310 Part 3: Make all devtools callers of getBoxQuads include option to suppress whitespace frames. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D45120
2019-09-12 19:05:52 +00:00
Nicolas Chevobbe
290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +00:00
Victor Porof
b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Gabriel Luong
5f4ffdf41f Bug 1494162 - Part 27: Lazy initialize the tooltip in AutocompletePopup. r=jdescottes 2018-10-02 15:01:56 -04:00
Mantaroh Yoshinaga
6f7df8a1ac Bug 1472942 - Part 2. Add setContentSize() instead of setContent() in HTMLTooltip. r=birtles
This patch will remove setContest(), and change the following things instead of this:

 * Use HTMLTooltip.panel.appendChild() instead of HTMLTooltip.setContent().
 * Add HTMLTooltip.setContetnSize() to specify the panel size if need this.

Differential Revision: https://phabricator.services.mozilla.com/D7044
2018-09-27 07:14:55 +00:00
Nicolas Chevobbe
f3f45446b5 Bug 1479373 - Refactor autocomplete popup for performance; r=jdescottes.
This patch introduces some options that can be passed to
setItems and openPopup to prevent doing unecessary work.
The main ideas here are to create all the popup items and
put them in a document fragment which then will be appended
to the popup, so we don't add them one by one which can be costly.
When creatingthe items, we also create one directly with the
selected class if autoSelect is set to true. This way, we don't have
to toggle the class later (which led to another reflow).

We take this work as an opportinuity to clean up the component.
Unused function (like appendItem and removeItem) are removed,
selectedIndex does not use a getter/setter anymore.

Some of the consumers calls are updated and so is the component test.

Differential Revision: https://phabricator.services.mozilla.com/D4848
2018-09-06 05:48:02 +00:00
Dorel Luca
f1adf73529 Backed out changeset ff6b5bae0da4 (bug 1479373) for devtools failures on devtools/client/inspector/rules/test/browser_rules_completion-new-property_04.js. CLOSED TREE 2018-09-05 15:10:37 +03:00
Nicolas Chevobbe
29bddc29c5 Bug 1479373 - Refactor autocomplete popup for performance; r=jdescottes.
This patch introduces some options that can be passed to
setItems and openPopup to prevent doing unecessary work.
The main ideas here are to create all the popup items and
put them in a document fragment which then will be appended
to the popup, so we don't add them one by one which can be costly.
When creatingthe items, we also create one directly with the
selected class if autoSelect is set to true. This way, we don't have
to toggle the class later (which led to another reflow).

We take this work as an opportinuity to clean up the component.
Unused function (like appendItem and removeItem) are removed,
selectedIndex does not use a getter/setter anymore.

Some of the consumers calls are updated and so is the component test.

Differential Revision: https://phabricator.services.mozilla.com/D4848
2018-09-05 08:34:47 +00:00
Julian Descottes
de5cde2836 Bug 1480384 - Remove unused theme option for autocomplete-popup;r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D2666
2018-08-02 15:05:50 +00:00
Nicolas Chevobbe
767d3664e3 Bug 1478435 - Apply photon-styling to autocomplete popup; r=nchevobbe.
This removes the border-radius from the autocomplete popup (and
its items) and refines the spacing.
Since we have more padding for the autocomplete items, we need
to adjust the xOffset when showing the popup.
The yOffset of the webconsole autocomplete is tweaked a bit so
we see its border; the xOffset of the markup search input is also
tweaked to consider the left padding we use to display the search
icon in the input.

MozReview-Commit-ID: JyLySLBUgGy
2018-07-26 09:08:10 +02:00
Nicolas Chevobbe
d2799971ec Bug 1475165 - Make autocomplete always select first item by default; r=Honza.
Previously, we were trying to select the item the closest
to the input used for the autocompletion. It was causing
some weird behaviour when the popup wasn't displayed at
the expected position.
Always selection the top-most item seems will avoid those
cases, bring us consistency across the toolbox as well as
with other tool having autocompletion (code editors, Chrome, …).
The autocomplete-popup test is modified to assert the new behavior.

MozReview-Commit-ID: DhNovX51KRO
2018-07-13 16:52:37 +02:00
Julian Descottes
ce0e289428 Bug 1473819 - Force height: Infinity for HTMLTooltip used by autocomplete;r=nchevobbe
MozReview-Commit-ID: DpWs2QZ9nNo
2018-07-06 10:14:23 +02:00
Blake Kaplan
bd5cecf60f Bug 1186265 - Move devtools over to getBounds(). r=pbro
This leaves getAdjustedQuads alone because it lives in its own world and its
result gets sent over IPC. That leaves things in a bit of an intermediate
state, but that should be OK for now.

MozReview-Commit-ID: DH6eGqCFhPr
2018-06-04 16:41:43 -07:00
Julian Descottes
82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Boris Zbarsky
8a166e6246 Bug 1455676 part 17. Stop using nsIDOMNode in devtools/. r=jdescottes 2018-05-29 22:58:50 -04:00
Gabriel Luong
9d3d56adcb Bug 1459027 - Lazy load the AutocompletePopup in the rule view. r=pbro 2018-05-21 10:14:40 -04:00
Julian Descottes
ab8674e3b2 Bug 1454888 - Autocomplete postLabel overlaps with the scrollbar of the suggestions popup. r=jdescottes
MozReview-Commit-ID: FpfqEvdYg3z
2018-05-01 23:45:03 +02:00
Julian Descottes
611bc0161c Bug 1451211 - Show a colour swatch next to colour values in the CSS variable autocomplete postlabel. r=jdescottes
MozReview-Commit-ID: 7obhsNOBu4N
2018-04-18 21:34:16 +02:00
Sarah Childs
a588d2f79f Bug 1431949 - Show variable values in the CSS variable autocomplete popup. r=jdescottes 2018-04-03 20:32:22 -04:00
J. Ryan Stinnett
8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Nicolas Chevobbe
a10117a12b Bug 1441885 - Remove warnings from autocomplete-popup.js; r=jdescottes.
This was caused by an innerHTML assignment. Switching to replaceWith + cloneNode
does the trick.

MozReview-Commit-ID: 4pnIijKoJHU
2018-03-08 16:20:59 +01:00
yulia
bd093feca1 Bug 1382605 - Fix 6 tests failures on devtools/client/shared due the EventEmitter refactoring r=nchevobbe
MozReview-Commit-ID: EaFYqaY2M79
2018-03-07 10:17:03 +01:00
ZER0
d78f1c54ef Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 03:47:30 +02:00
Wes Kocher
aa1caed330 Backed out changeset 58f678547059 (bug 1381542) for conflicting with the incoming m-c merge a=backout
MozReview-Commit-ID: 1wKVHbOAUdc
2017-08-10 18:23:14 -07:00
ZER0
c91b128704 Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 02:43:47 +02:00
Frederik Braun
96b2642639 Bug 1351608 - Disable warnings for existing violations to no-unsanitize rule r=Standard8.
MozReview-Commit-ID: 7cTNL5jMtRw
2017-07-03 20:07:02 +01:00
Florian Quèze
63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Sebastian Hengst
c6d9ef3e98 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen
548b6bdbef Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Gabriel Luong
a61285b0f2 Bug 1322028 - Avoid destructuring requires where possible in the inspector. r=jdescottes 2016-12-17 12:44:56 +09:00
Tom Tromey
8a93d4e955 Bug 1316630 - don't emit pref-changed event on gDevTools; r=jdescottes
MozReview-Commit-ID: CCqAf8dBFSY
2016-11-21 08:47:10 -07:00
Gabriel Luong
4943d23a3b Bug 1307481 - Part 3: HTMLTooltip should receive the document that it should be attached to instead of the toolbox r=jdescottes 2016-10-08 09:49:07 -04:00
Wes Kocher
591a7b2fd1 Backed out 2 changesets (bug 1307481) for mass dt bustage a=backout
Backed out changeset 91c6a72e5d0d (bug 1307481)
Backed out changeset a9f9f5611272 (bug 1307481)
2016-10-07 11:54:38 -07:00
Gabriel Luong
52c4111f6c Bug 1307481 - Part 3: HTMLTooltip should receive the document that it should be attached to instead of the toolbox r=jdescottes 2016-10-07 13:33:52 -04:00
Gabriel Luong
876454c8a9 Bug 1307481 - Part 1: Move Tooltip.js and HTMLTooltip.js into widgets/tooltip/ r=jdescottes 2016-10-04 22:48:49 -04:00
Julian Descottes
e49ad837f4 Bug 1285591 - fix accessibility in devtools autocomplete using suggestion list clone;r=bgrins
Devtools autocomplete popups are hosted in a different document from the input
being autocompleted. To allow accessibility tools such as screen readers to still
make sense of this widget, a clone of the suggestion list is now inserted in the same
document as the input, and the aria-activedescendant attribute is updated on the input
accordingly.

MozReview-Commit-ID: 8rFjF6nvEyU
2016-07-22 17:35:03 +02:00
Julian Descottes
5bc2788731 Bug 1266456 - part9: use HTMLTooltip for autocomplete-popup;r=bgrins
Modify the devtools autocomplete-popup to rely on a HTMLTooltip instance
instead of a XUL panel.

Other than the straightforward migration to HTML, the main difference with
the new implementation is that the richlistbox has now been replace with a
simple HTML list element. The former XUL widget used to be able to take the
focus from the input it was linked to.

This is no longer the case. Most autocomplete users were always keeping the
focus in the input, except for the inspector-search, which was moving the
focus back and forth between the input and the autocomplete's richlistbox.
Now the focus is always in the input. A practical example to illustrate how
this changes the UX: before when the user had the focus on the first element
of the list, pressing "DOWN" would keep the element selected but visually move
the focus in the input. Now the selection simply cycles to the next item.

Even though this introduces a difference in behaviour compared to the previous
implementation, it makes the inspector search UX consistent with the other
autocomplete widgets used in devtools.

Another difference is about the display for the inspector-search. The position
of the autocomplete popup used to be above the input. This is now impossible to
achieve because the search input is at the top of the toolbox and the HTML tooltip
can not exceed the limits of the toolbox.

For this #2 issue, either we manage to use XUL panel wrappers, in which case, the
autocomplete will be displayed as it used to. Or we can invert the order in which
items are inserted and explicitly ask for the autocomplete to be displayed below the
input. I prefered not to change this here in order to make the code change easier to
understand, but it should be addressed in a follow-up.

MozReview-Commit-ID: jH9aXm9Jvz
2016-07-07 16:32:42 +02:00