-
Notifications
You must be signed in to change notification settings - Fork 174
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
Context Switcher in top navigation #190
Conversation
config.parentNodePath = `${config.parentNodePath}/`; | ||
} | ||
} | ||
if (!config.parentNodePath) { |
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.
Maybe you can use here just else
instead of if (!config.parentNodePath)
const hasNoDynamicPathSegment = | ||
config.parentNodePath.split('/').filter(p => p.startsWith(':')) | ||
.length === 0; | ||
if (hasNoDynamicPathSegment && !config.parentNodePath.endsWith('/')) { |
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.
Why do we have to add the final /
only if there is no dynamic path segment?
}, | ||
data() { | ||
return { | ||
dropDownStates: {}, |
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.
It would be nice to have an initialisation of all keys here, I see above we are setting some other keys on component creation.
docs/navigation-configuration.md
Outdated
- **position** is optional. Defines the action element position. Can be `top` or `bottom`. Defaults to `top` | ||
- **link** is optional. Defines an absolute Link to a **node**. | ||
- **clickHandler** specifies a function and is executed on click and should return a boolean. If it returns `true`, **link** is opened afterwards. | ||
- **fallbackLabelResolver** specifies a function that is executed to fetch a context element label if **options** are not yet loaded or **label** is not defined. |
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.
Maybe I am missing something, since I don't understand why are we using the fallbackLabelResolver if 'options are not yet loaded', since this function is not responsible for setting the pathValue
field for options.
… into feature/context-switcher
This reverts commit 86ba769.
…us/luigi into feature/context-switcher
… into feature/context-switcher
Fixes now also #193 |
… into feature/context-switcher
Adds the possibility to show a dropdown with a list of links that can be used to enter a contextual path, eg. environments. Typically used in combination with a dynamic node, to be able to enter also hidden contexts.