Skip to content
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

Documentation pages navigation: highlight currently selected page #284

Closed
gavinr opened this issue Aug 16, 2018 · 7 comments · Fixed by #341
Closed

Documentation pages navigation: highlight currently selected page #284

gavinr opened this issue Aug 16, 2018 · 7 comments · Fixed by #341
Labels

Comments

@gavinr
Copy link
Contributor

gavinr commented Aug 16, 2018

I'll admit this is a subjective request, but I personally find it easier when the page I'm on highlights itself in the navigation. It helps me get my bearings if maybe I arrived on this page from a search engine or outside link. So I would propose changing this:
image

to something like this:
image
(notice the background highlight on the selected page in the nav)

Just throwing it out there to see what you all think! Thanks!

@jgravois
Copy link
Contributor

definitely a good suggestion.

@noahmulfinger
Copy link
Contributor

The highlighting actually works if you run the docs locally. I think we need to change something in the calcite web configuration so it works in both environments.

@gavinr
Copy link
Contributor Author

gavinr commented Aug 17, 2018

I see now - yes, when running the doc locally the current page in the navigation is outlined:
image

I'm not too familiar with the docs build system, but FWIW it looks like the list-item-active class is just not getting added to the div when hosted in production:

production

vs locally hosted:

locally hosted

@jgravois
Copy link
Contributor

the problem is worse than that. is-active isn't being set on page load in production anywhere on page load.

proposed fix hack in #334

screenshot 2018-09-21 12 01 39

screenshot 2018-09-21 12 02 28

@gavinr
Copy link
Contributor Author

gavinr commented Oct 5, 2018

looks great @jgravois!

@tomwayson
Copy link
Member

I hate to even bring this up, but in FF I can get the nav in a state where both nav links appear active by going from one to the other and then using the back button (or key board shortcut):

image

As long as navigate back/forward using the built in browser controls both continue to appear active, but when I click on either one, only that one will be appear active.

Other than that this looks great, and I'm not even sure a fix for ^^^ is worth the trouble.

@jgravois
Copy link
Contributor

jgravois commented Oct 6, 2018

feature-service pages expand the 'admin' package tree too. 😉

2018-10-05 17 52 24

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

Successfully merging a pull request may close this issue.

4 participants