Closed Bug 1830240 Opened 1 years ago Closed 1 year ago

Move file search state from redux to react component

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(4 files)

The data currently store in redux related to the search-in-file bar in bottom of the source text content is actually specific to SearchBar component.
It isn't being used anywhere else. So there is no real value in having it being stored in redux.
It created unecessary store updates making the overall application slower, as all mapStateToProps function will be called even if we know all changes made to this data will be specific to this unique component.

This will help address bug 1822295 as the React component state will be cleared on thread removal as the selected source will be cleared if it relates to a removed thread. Nullifying the selected source will cleare this component's state.

As we have various search component, it would help to be slightly more precise
and this helps connect this component with "file" search selectors, reducers, actions.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

As these results are only used within this react component,
we can make it become part of its state.
This will reducer number of Redux store updates and improve performances.

This also simplify redux management as we no longer have to try to clear
results on thread/target removal. The source will be removed and source unselected
and SearchInFileBar will be destroyed.

Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0b2aeb734e07 [devtools] Rename SearchBar to SearchInFileBar. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/36753177365f [devtools] Make SearchInFileBar component update itself by itself when changing the selected source. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/8414e854a500 [devtools] Remove unused traverseResults methods. r=devtools-reviewers,bomsy https://hg.mozilla.org/integration/autoland/rev/3406f9953901 [devtools] Move search in file results from redux, to SearchInFileBar state. r=devtools-reviewers,bomsy
Duplicate of this bug: 1822295
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: