Closed Bug 1543859 Opened 6 months ago Closed 5 months ago

Refactor treeOrder.js in sources-tree for readability & remove duplicate code

Categories

(DevTools :: Debugger, task, P3)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: anthonyxie64, Assigned: anthonyxie64)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Within treeOrder.js, the file responsible for sorting the sourcesTree, we have a matcher function for each exception (index, debuggeeHost, etc.) because we want to account for these edge cases when sorting the sourcesTree.

We have duplicate code for each of these matcher functions and going forward, adding more edge cases will only result in more duplicate code and impact readability.

Given you find this is a valid issue, I'd like to work on it!

Type: defect → enhancement

Go for it!

Assignee: nobody → anthonyxie64
Type: enhancement → task
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3

How's it going Anthony?

Blocks: dbg-frontend

Hey Jason, thanks for checking in. I wanted to wait until Bug #1533418 was resolved before working on this. I've also been busy applying to jobs recently, will revisit this next week! But if someone wants to work on this in the meantime, happy to share what I've done so far and pair on the issue :)

Refactored treeOrder code to remove duplicate code and make it simple to add
new exceptions in sorting the sourcesTree

Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7667da75c98b
Refactored treeOrder code to remove duplicate code and make it simple to add r=davidwalsh
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.