Closed
Bug 1418969
Opened 7 years ago
Closed 6 years ago
Remove helper API from requests reducer
Categories
(DevTools :: Netmonitor, enhancement, P2)
DevTools
Netmonitor
Tracking
(firefox60 fixed)
RESOLVED
FIXED
Firefox 60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: Honza, Assigned: abhinav.koppula, Mentored)
Details
(Whiteboard: good-first-bug)
Attachments
(1 file, 1 obsolete file)
This is a follow-up for bug 1408182 We should remove helper API (relic from times when we used ImmutableJS) from devtools/client/netmonitor/src/reducers: * isEmpty * valueSeq Look at the bottom of the file. The following function: function mapNew(map) { let newMap = new Map(map); newMap.isEmpty = () => newMap.size == 0; newMap.valueSeq = () => [...newMap.values()]; return newMap; } ... should be as follows: function mapNew(map) { return new Map(map); } ... and consequently, it can be removed entirely and `new Map(map)` used directly. The rest of the code base should be adopted not to use the API anymore. Honza
Reporter | ||
Updated•7 years ago
|
Mentor: odvarko
Priority: -- → P2
Whiteboard: good-first-bug
Reporter | ||
Comment 1•7 years ago
|
||
> We should remove helper API (relic from times when we used ImmutableJS) from
> devtools/client/netmonitor/src/reducers:
Correction, the name of the file is:
devtools/client/netmonitor/src/reducers/requests.js
Honza
Reporter | ||
Comment 2•7 years ago
|
||
We should also remove helpers from `getSortedRequests` and `getDisplayedRequests` selectors. devtools/client/netmonitor/src/selectors/requests.js There are: `get` and `isEmpty` API defined inside these two selectors -> remove it. Honza
Comment 3•7 years ago
|
||
Hey I'd like to fix this if that's possible. Thanks
Comment 4•7 years ago
|
||
I wonder if I could work on this bug. Thank you
Reporter | ||
Comment 5•7 years ago
|
||
(In reply to Joshua Longhi from comment #3) > Hey I'd like to fix this if that's possible. Thanks Sure, assigned to you. (In reply to Jaewoongyu from comment #4) > I wonder if I could work on this bug. Thank you Sorry, Joshua was first. Honza
Assignee: nobody → joshualonghi
Comment 6•7 years ago
|
||
What about 'requests: mapNew()' on line 31? Can this be changed to new Map()?
Comment 7•7 years ago
|
||
Comment 8•6 years ago
|
||
Hey Joshua, remember to add bug number & reviewer in your commit message `Bug 1418969 - Remove helper API from requests reducer r=honza`, so that honza will be informed about your review request. Otherwise, he might forgot your patch.
Flags: needinfo?(joshualonghi)
Updated•6 years ago
|
Flags: needinfo?(joshualonghi)
Assignee | ||
Comment 10•6 years ago
|
||
Let me know only if no one is actively working on this issue and is free to be taken.
Reporter | ||
Comment 11•6 years ago
|
||
Comment on attachment 8935966 [details] [diff] [review] Remove helper API from requests reducer Review of attachment 8935966 [details] [diff] [review]: ----------------------------------------------------------------- This is good start, but other places in the code needs to be fixed as well. Failures in this try-push should indicate what places in the code base should be fixed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d67f1208ebe040adfe21a18747bc2de45995007 Honza
Reporter | ||
Comment 12•6 years ago
|
||
(In reply to Abhinav Koppula from comment #10) > Let me know only if no one is actively working on this issue and is free to > be taken. Yes, it's free. Joshua doesn't seem to work on this one anymore. Assigned to you Abhinav! Honza
Assignee: joshualonghi → abhinav.koppula
Flags: needinfo?(odvarko)
Comment hidden (mozreview-request) |
Reporter | ||
Comment 14•6 years ago
|
||
mozreview-review |
Comment on attachment 8944188 [details] Bug 1418969 - Remove helper API from requests reducer; https://reviewboard.mozilla.org/r/214474/#review220156 Thanks Abhinav for working on this! One inline comment + let's wait for try results. Honza ::: devtools/client/netmonitor/src/reducers/requests.js:177 (Diff revision 1) > if (!action.open) { > nextState.selectedId = null; > return nextState; > } > > - if (!state.selectedId && !state.requests.isEmpty()) { > + if (!state.selectedId && !(state.requests.size == 0)) { Please change to: state.requests.size > 0
Attachment #8944188 -
Flags: review?(odvarko)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 16•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8944188 [details] Bug 1418969 - Remove helper API from requests reducer; https://reviewboard.mozilla.org/r/214474/#review220156 Done.
Reporter | ||
Updated•6 years ago
|
Attachment #8935966 -
Attachment is obsolete: true
Reporter | ||
Comment 17•6 years ago
|
||
mozreview-review |
Comment on attachment 8944188 [details] Bug 1418969 - Remove helper API from requests reducer; https://reviewboard.mozilla.org/r/214474/#review220498 Looks good! R+ (try green) Honza
Attachment #8944188 -
Flags: review?(odvarko) → review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 18•6 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/df6485ef321a Remove helper API from requests reducer; r=Honza
Keywords: checkin-needed
Comment 19•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/df6485ef321a
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•