Make console autocompletion work with optional chaining
Categories
(DevTools :: Console, task, P2)
Tracking
(firefox74 verified, firefox75 verified)
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details |
In Bug 1566143 we plan to add support for optional chaining syntax, which mean we'll have to change how we parse the input for the autocompletion.
Example:
var response = { prototype: {object: { a: 1, b: 2}}}
var result = response?.prototype?.object?.
Here we should check on each part if the property does exist, and retrieve its properties.
So with our example, we should return a
and b
.
This impact the server side (JsPropertyProvider), as well as the frontend (when we cache the autocompletion result).
It might also have an impact on the ConfirmDialog if any of the optional properties is a getter.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
bugherder |
Assignee | ||
Comment 4•5 years ago
|
||
Comment on attachment 9122314 [details]
Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza.
Beta/Release Uplift Approval Request
- User impact if declined: The webconsole autocomplete won't work when using the new
?.
operator that landed in Firefox 74. - Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: 1. Open the console
- Type
document?.
-> the autocomplete popup should be displayed
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): DevTools only change, covered by thorough test cases
- String changes made/needed:
Assignee | ||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Comment on attachment 9122314 [details]
Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza.
Devtools, has tests, low risk, uplift approved for 74.0b3, thanks
Comment 6•5 years ago
|
||
Hello!
Reproduced the issue using Firefox 72.0a1 (20191105095755) on Windows 10x64. There is no autocomplete pop up is not displayed after following STR from comment 4.
The issue is verified fixed with Firefox 75.0a (20200211215452) on Windows 10x64, Ubuntu 18.04 and macOS 10.15. The autocomplete pop up is displayed after typing document?.
in the browser console and web console.
Updated•5 years ago
|
Comment 7•5 years ago
|
||
bugherder uplift |
Comment 8•5 years ago
|
||
Verified with 74.0b3 (20200214015126) on Windows 10x64, macOS 10.15 and Ubuntu 18.04. The dropdown is correctly shown after typing document?.
in the browser console and web console.
Updated•5 years ago
|
Description
•