Rename client/shared/components/AutoCompletePopup.js to SearchBoxAutocompletePopup
Categories
(DevTools :: Shared Components, task, P3)
Tracking
(firefox75 fixed)
| Tracking | Status | |
|---|---|---|
| firefox75 | --- | fixed |
People
(Reporter: jdescottes, Assigned: tusharxdev, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(3 files, 2 obsolete files)
We have 2 autocomplete popup widgets:
- https://searchfox.org/mozilla-central/source/devtools/client/shared/components/AutoCompletePopup.js
- https://searchfox.org/mozilla-central/source/devtools/client/shared/autocomplete-popup.js
The first one is only used by the SearchBox shared react component, the second one is used directly by the inspector and the console. Both export a class with the same exact name "AutocompletePopup". We should rename one of them to make it less confusing. Since the first one is only used by SearchBox, renaming it to SearchBoxAutocompletePopup would probably be the most straightforward, but happy to consider other names :)
(spotted while reviewing Bug 1609942)
Comment 1•1 year ago
|
||
Thanks for filing this Julian. Setting it up as a good-first-bug.
The file should be renamed using hg mv so we don't lose the history on it.
Comment 2•1 year ago
|
||
I quickly fixed this. Submitting a patch soon.
Comment 3•1 year ago
|
||
Thanks Aggelos, but as the tag indicates, it's a good first bug, and you already did your first bug :)
Let's keep that one for people whose this will really be their first bug.
Comment 4•1 year ago
|
||
Fair enough :)
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
I am new just trying to get started. Can any one help me to understand this bug, does we just need to rename the name of the function such that it does not export a class with same name like:
let SearchBoxAutocompletePopup = function AutocompletePopup(toolboxDoc, options = {}) {.....}
module.exports = SearchBoxAutocompletePopup;
or any think else.
| Reporter | ||
Comment 7•1 year ago
|
||
(In reply to mab from comment #6)
I am new just trying to get started. Can any one help me to understand this bug, does we just need to rename the name of the function such that it does not export a class with same name like:
let SearchBoxAutocompletePopup = function AutocompletePopup(toolboxDoc, options = {}) {.....}
module.exports = SearchBoxAutocompletePopup;
or any think else.
Hi mab!
For this bug
- we need to first rename the file at https://searchfox.org/mozilla-central/source/devtools/client/shared/components/AutoCompletePopup.js to
SearchBoxAutocompletePopup.js(usehg mvto do that) - then in the file we need to rename both matches of
AutocompletePopuptoSearchBoxAutocompletePopup - then we have to update the "index" for this file, rename
AutocompletePopuptoSearchBoxAutocompletePopupin https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/devtools/client/shared/components/moz.build#19 (! be careful the list needs to be alphabetically sorted, soSearchBoxAutocompletePopupshould be betweenSearchBox.jsandSidebar.js - finally in https://searchfox.org/mozilla-central/source/devtools/client/shared/components/SearchBox.js we have to rename
AutocompletePopuptoSearchBoxAutocompletePopupas well (https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/devtools/client/shared/components/SearchBox.js#17,19,243)
If you are able to build Firefox, simply doing a ./mach build should catch most of the mistakes.
Let us know if you have more questions.
| Reporter | ||
Comment 8•1 year ago
|
||
Also the code you pasted let SearchBoxAutocompletePopup = function AutocompletePopup(toolboxDoc, options = {}) {.....} is from https://searchfox.org/mozilla-central/source/devtools/client/shared/autocomplete-popup.js . We don't want to rename this file, we want to rename the other one: https://searchfox.org/mozilla-central/source/devtools/client/shared/components/AutoCompletePopup.js . It can be confusing, so make sure you have the right file before renaming things :)
| Assignee | ||
Comment 9•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6079218e54c Rename client/shared/components/AutoCompletePopup.js to SearchBoxAutocompletePopup. r=nchevobbe
| Reporter | ||
Comment 14•1 year ago
|
||
Thank you for fixing this bug tusharxdev!
It will make the code much easier to navigate.
Comment 15•1 year ago
|
||
| bugherder | ||
Description
•