Sticky highlighting and context menu don't work for private fields in ES modules
Categories
(Webtools :: Searchfox, defect)
Tracking
(Not tracked)
People
(Reporter: aminomancer, Assigned: asuth)
References
Details
Attachments
(2 files)
See UrlbarView.sys.mjs for example. If you hover over one of the private fields (properties prefixed with a hash #
), it will not be highlighted and clicking it will not open the context menu. With ESMification, an increasing number of pseudo-private fields (properties prefixed with an underscore _
) will probably be converted to real private fields, so Searchfox will be harder to use as that proceeds.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
The JS analysis was fine here, but the tokenizer didn't think a symbol could start with a #
.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Thanks for filing this!
A fix has landed and I've kicked off a mozilla-central indexing run, so we should ideally have this working for m-c in less than 3 hours and working for all the other trees in less than a day. I'll keep an eye on the run I just kicked off in case something weird happens, but this was reasonably straightforward and part of why the problem wasn't noticed is that there were previously no checks because the JS analysis is in such a sorry state that we also just don't have a lot of checks for it. Please do let your manager know if you'd benefit from improved JS indexing, as there is a massive amount of potential improvement that we could accomplish with bug 1740290.
Reporter | ||
Comment 4•2 years ago
|
||
Awesome! That was the fastest landing I've ever seen 😂
Yeah I was reading through that bug a couple weeks ago, we do work with a lot of jsx/tsx files (e.g. this one) and I had seen your comment on bug 1756018. The sticky highlighting and context menu have been very useful so having that in jsx would be great.
So searchfox still shows "Search for the substring mainContainer" when clicking #mainContainer
. Is this something blocked by the SCIP work in bug 1740290 or a simpler bug?
(I mean, it should search for #mainContainer
, not mainContainer
.)
Assignee | ||
Comment 6•2 years ago
|
||
That's the client side https://github.com/mozsearch/mozsearch/blob/65a428fa82005a7677b7dbd62dd413a1518dc89e/static/js/context-menu.js#L262. Note that we don't currently have any test infrastructure for actually viewing searchfox in a browser, so this would be a very easy fix for someone, as there's no tests to write! ;)
Assignee | ||
Comment 7•2 years ago
|
||
I quickly wrote and tested the change and have put up a pull request for Emilio to review.
Description
•