8000 Added option to use longnames in navigation to default template by snoack · Pull Request #986 · jsdoc/jsdoc · GitHub
[go: up one dir, main page]

Skip to content

Added option to use longnames in navigation to default template #986

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
merged 1 commit into from
Aug 13, 2015
Merged

Added option to use longnames in navigation to default template #986

merged 1 commit into from
Aug 13, 2015

Conversation

snoack
Copy link
Contributor
@snoack snoack commented Apr 15, 2015

Currently, only the names of the symbols themselves are shown in the navigation. However this is confusing and results in ambiguous names in larger projects. So I'd like to add an option to show the full namepath instead.

@@ -300,7 +300,13 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
itemsNav += '<li>' + linktoFn('', item.name) + '</li>';
}
else if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
itemsNav += '<li>' + linktoFn(item.longname, item.name.replace(/^module:/, '')) + '</li>';
var displayName;
if (env.conf.templates.useLongnameInNav)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be env.conf.templates.default.useLongnameInNav.

Also, please use braces in the if/else statement for consistency with the rest of the file.

@hegemonic
Copy link
Contributor

Sorry for the delay in reviewing this. I'll merge as soon as you've addressed my comments.

@snoack
Copy link
Contributor Author
snoack commented Aug 8, 2015

Updated the pull request, addressing your comments. Thanks for reviewing.

hegemonic added a commit that referenced this pull request Aug 13, 2015
Added option to use longnames in navigation to default template
@hegemonic hegemonic merged commit 6705b96 into jsdoc:master Aug 13, 2015
@hegemonic
Copy link
Contributor

Merged to master. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0