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

UI: Replace breadcrumbs with configurable nav #853

Merged
merged 2 commits into from
Mar 2, 2024
Merged

UI: Replace breadcrumbs with configurable nav #853

merged 2 commits into from
Mar 2, 2024

Conversation

bkeepers
Copy link
Collaborator

@bkeepers bkeepers commented Mar 1, 2024

This replaces breadcrumbs in the Flipper UI with a configurable set of nav_items, displayed as tabs with underlines.

You can add items to the nav:

Flipper::UI.configure do |config|
  config.nav_items.insert 1, { title: "Custom", href: "/my/custom/path" }
end

Before

image

After

image

breadcrumb_href = href.nil? ? href : "#{script_name}#{href}"
@breadcrumbs << Breadcrumb.new(text, breadcrumb_href)
end

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is technically a breaking change, but I'm not sure that this method would be used outside of this code.

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.

1 participant