-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Always include a root node in the navigation bar. #8812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @Andy-MS, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
👍 |
This lets us change the navigation bar counting algorithm to traverse from the root only, so it never has duplicate nodes.
This reduces the confusion of verify.navigationBarCount() counting duplicate items.
Added a new commit which needs review. |
node 6.2.0: "a".localeCompare("A") is -1. node 0.10.45: "a".localeCompare("A") is 32.
|
||
// Remove any properties that tend to all have the same value so that test data is easier to read. | ||
private simplifyNavigationBar(items: ts.NavigationBarItem[]): any { | ||
return items.map(item => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is only for comparison purposes, i would do this in the replacer function for JSON.stringify(items, (k,v)=> { if (key === "indent") return undefined; return v; });
test changes look good. i would give the JSON.stringify(item, replacerFunction) a try. |
This should wait for #8764 to be resolved so that the root has all the children it needs.