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

feat: Support external links in navigation #1958

Merged
merged 4 commits into from
May 2, 2023
Merged

feat: Support external links in navigation #1958

merged 4 commits into from
May 2, 2023

Conversation

marek-mihok
Copy link
Contributor

@marek-mihok marek-mihok commented May 2, 2023

This change adds the path attribute for ui.nav_item.

Updated API:

/** Create a navigation item. */
export interface NavItem {
  /** The name of this item. Prefix the name with a '#' to trigger hash-change navigation. */
  name: Id
  /** The label to display. */
  label: S
  /** An optional icon to display next to the label. */
  icon?: S
  /** True if this item should be disabled. */
  disabled?: B
  /** An optional tooltip message displayed when a user hovers over this item. */
  tooltip?: S,
  /** The path or URL to link to. If specified, the `name` is ignored. The URL is opened in a new browser window or tab. E.g. `/foo.html` or `http://example.com/foo.html` */
  path?: S
}
Screen.Recording.2023-05-02.at.11.09.04.mov

Closes #1952

@marek-mihok marek-mihok marked this pull request as ready for review May 2, 2023 09:10
mturoci
mturoci previously approved these changes May 2, 2023
Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

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

Thanks @marek-mihok, just one small nitpick comment.

website/widgets/content/navigation.md Outdated Show resolved Hide resolved
@marek-mihok marek-mihok requested a review from mturoci May 2, 2023 13:10
@mturoci mturoci merged commit c4750c9 into master May 2, 2023
@mturoci mturoci deleted the feat/issue-1952 branch May 2, 2023 13:28
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.

Support external links for ui.nav_item
2 participants