Skip to content

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

Merged
6 commits merged into from
May 27, 2016
Merged

Always include a root node in the navigation bar. #8812

6 commits merged into from
May 27, 2016

Conversation

ghost
Copy link

@ghost ghost commented May 25, 2016

This should wait for #8764 to be resolved so that the root has all the children it needs.

@msftclas
Copy link

Hi @Andy-MS, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Andy Hanson). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@mhegazy
Copy link
Contributor

mhegazy commented May 25, 2016

👍

Andy Hanson added 2 commits May 26, 2016 08:40
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.
@ghost ghost force-pushed the navbar_root branch from 53a9393 to fe970ab Compare May 26, 2016 15:40
@ghost
Copy link
Author

ghost commented May 26, 2016

Added a new commit which needs review.

@ghost ghost mentioned this pull request May 26, 2016
Andy Hanson added 2 commits May 26, 2016 09:01
node 6.2.0: "a".localeCompare("A") is -1.
node 0.10.45: "a".localeCompare("A") is 32.
@ghost ghost force-pushed the navbar_root branch from c861d56 to 58d69cd Compare May 26, 2016 17:36

// 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 => {
Copy link
Contributor

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; });

@mhegazy
Copy link
Contributor

mhegazy commented May 26, 2016

test changes look good. i would give the JSON.stringify(item, replacerFunction) a try.

@ghost ghost force-pushed the navbar_root branch from 54663cf to b2664e7 Compare May 27, 2016 13:27
@ghost ghost merged commit a1f110f into master May 27, 2016
@ghost ghost deleted the navbar_root branch May 27, 2016 13:56
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants