Closed Bug 1594009 Opened 5 years ago Closed 5 years ago

Make console autocompletion work with optional chaining

Categories

(DevTools :: Console, task, P2)

task

Tracking

(firefox74 verified, firefox75 verified)

VERIFIED FIXED
Firefox 75
Tracking Status
firefox74 --- verified
firefox75 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

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.

Priority: -- → P2
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Depends on: 1610447
Attachment #9122314 - Attachment description: Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza. → Bug 1594009 - Add optional chaining support for console autocomplete. r=ochameau.
Attachment #9122314 - Attachment description: Bug 1594009 - Add optional chaining support for console autocomplete. r=ochameau. → Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza.
Attachment #9122314 - Attachment description: Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza. → Bug 1594009 - Add optional chaining support for console autocomplete. r=ochameau.
Attachment #9122314 - Attachment description: Bug 1594009 - Add optional chaining support for console autocomplete. r=ochameau. → Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/77589ea1cf20 Add optional chaining support for console autocomplete. r=Honza.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75

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
  1. 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:
Attachment #9122314 - Flags: approval-mozilla-beta?
Flags: qe-verify+

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

Attachment #9122314 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

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.

QA Whiteboard: [qa-triaged]

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: