-
Notifications
You must be signed in to change notification settings - Fork 187
Add support for configurable navbar title links. #1704
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
Will let @kwm4385 and the more-UI-inclined take a look at the react bits, but I agree on making this and the admin dropdown match |
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.
Made a few changes to get everything working right and for styling. Highlights below
@@ -35,6 +35,26 @@ function isActive(navbarPath, fragment) { | |||
// put into page wrapper, render children | |||
const Navigation = (props) => { | |||
const fragment = props.location.pathname.split('/')[1]; | |||
const navTitle = config.navTitleLinks | |||
? ( | |||
<ul className="nav navbar-nav"> |
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.
Wrapping this in the same ul
structure will give the consistent menu look you seek.
@@ -35,6 +35,26 @@ function isActive(navbarPath, fragment) { | |||
// put into page wrapper, render children | |||
const Navigation = (props) => { | |||
const fragment = props.location.pathname.split('/')[1]; | |||
const navTitle = config.navTitleLinks |
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.
Needed a null check for the config field itself somewhere, otherwise it would break if it wasn't set.
{config.title} <span className="caret" /> | ||
</a> | ||
<ul className="dropdown-menu"> | ||
{Object.keys(config.navTitleLinks).map((linkTitle, index) => |
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.
These links can be inlined
🚢 |
Looks like

This setup defaults to having the nav header title link back to the Dashboard (as is the case today) if no links are configured.
Might have to tweak the CSS class setup slightly, since the
Admin
dropdown has squared corners, but this one's got rounded corners.