[Sources] Auto expand path of selected source#5716
[Sources] Auto expand path of selected source#5716darkwing merged 2 commits intofirefox-devtools:masterfrom
Conversation
9cc7356 to
ea2abe9
Compare
| while (index <= reversedItems.length - 2) { | ||
| this.setExpanded(reversedItems[index], true, false); | ||
| index++; | ||
| } |
There was a problem hiding this comment.
hmm, can you discuss what this does?
There was a problem hiding this comment.
I have added a comment to make it more clear
| function InitialState(): Record<SourceTreeState> { | ||
| return makeRecord({ | ||
| expanded: null | ||
| expanded: new Set() |
|
Kicked Travis, let's see if we pass now :) |
|
We'll want a mochitest or two for this but I looooove this functionality. Keep up the great work @AnshulMalik ! |
|
I am confused with what's going on in diff --git a/src/test/mochitest/head.js b/src/test/mochitest/head.js
index 873d1ada..f8dd68ce 100644
--- a/src/test/mochitest/head.js
+++ b/src/test/mochitest/head.js
@@ -212,8 +212,12 @@ function waitForSources(dbg, ...sources) {
}
if (!sourceExists(store.getState())) {
+ info(`WAITING FOR ${url}`);
return waitForState(dbg, sourceExists, `source ${url}`);
}
+
+ info('RESOLVING DIRECTLY, ALREADY EXISTS');
+ return true;
})
);
}It says, wait for two sources, but the sources are already loaded, |
|
Been trying to figure out the issue here but having no luck so far. Oddly enough, the tests pass for me locally. |
|
probably unrelated, but a rebase is always healthy |
f7caaf7 to
9287cc8
Compare
9287cc8 to
1b530d2
Compare
c958a1c to
c10d7a7
Compare
|
|
||
| let index = highlightItems.length - 2; | ||
|
|
||
| if (this.props.autoExpandOnHighlight) { |
There was a problem hiding this comment.
I turned autoExpandOnHighlight off and it didn't change the fact that the test failed.
| return this.focusItem(highlightItems[0]); | ||
| } | ||
|
|
||
| let index = highlightItems.length - 2; |
There was a problem hiding this comment.
We should comment this; the -2 value is a mystery
There was a problem hiding this comment.
The comment in the while loop below sheds some light. I should move it up
01d450c to
356d9d1
Compare
darkwing
left a comment
There was a problem hiding this comment.
Great work @AnshulMalik !!
* auto expand path of selected source * add test
Summary of Changes
Screenshots/Videos (OPTIONAL)