Closed Bug 1617529 Opened 5 years ago Closed 5 years ago

Rename client/shared/components/AutoCompletePopup.js to SearchBoxAutocompletePopup

Categories

(DevTools :: Shared Components, task, P3)

task

Tracking

(firefox75 fixed)

RESOLVED FIXED
Firefox 75
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:

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)

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.

Mentor: nchevobbe
Keywords: good-first-bug

I quickly fixed this. Submitting a patch soon.

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.

Fair enough :)

Assignee: nobody → agg_gam
Status: NEW → ASSIGNED
Attachment #9128497 - Attachment is obsolete: true
Assignee: agg_gam → nobody
Status: ASSIGNED → NEW

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.

(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

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.

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: nobody → tusharxdev
Status: NEW → ASSIGNED
Attachment #9128918 - Attachment is obsolete: true
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6079218e54c Rename client/shared/components/AutoCompletePopup.js to SearchBoxAutocompletePopup. r=nchevobbe

Thank you for fixing this bug tusharxdev!
It will make the code much easier to navigate.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: