mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
14ff2e3235
This patch adds the ability to open the autocomplete popup when typing an opening bracket (i.e. `[`]) in the console input. This impacts a significant amount of function where we assumed that the only way to get a completion was to use a dot. We uses the rename `anylyzeInputString` function to get the completion part from an input, as well as if the user is performing an element access (i.e., using the bracket). We then send that information to the webconsole actor, which send it to the client. This allows us to rely on a single parse of the input and gives us access to this information everywhere we need to, be it on the client or on the server. We allow the user to type property name without quotes, and we add them when the user accept an autocompletion. We also automatically add a closing bracket (i.e. `]`), when it's needed. Some test are added. On the server side to make sure the actor's autocomplete function returns what's expected. We take that as an opportunity to add test for commands. On the client side, tests are added to ensure the different behavior works as expected (check the completion text and the input after accepting the completion when the user entered some letters, or not, with or without quotes, with different quotes, hitting the autocomplete cache, …). A test which accesses the autocomplete cache was modified since the shape of the cache changed to include the last matchProp as well as the isElementAccess boolean. Differential Revision: https://phabricator.services.mozilla.com/D6128 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
actors | ||
performance | ||
socket | ||
startup | ||
tests | ||
main.js | ||
moz.build |