Skip to content

Add hide_navigation_bar embed param to hide the nav bar without disabling navigation - #9761

Open
nishantmonu51 wants to merge 2 commits into
mainfrom
nishant/separate-embed-navigation-bar-flag
Open

Add hide_navigation_bar embed param to hide the nav bar without disabling navigation#9761
nishantmonu51 wants to merge 2 commits into
mainfrom
nishant/separate-embed-navigation-bar-flag

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

The embed navigation param conflated two concerns: whether the runtime JWT is scoped to a single resource, and whether Rill's own navigation chrome renders. Embedders who wanted a chrome-free embed had to set navigation: false, which also removed the drill-through from a Canvas component to an Explore dashboard.

  • Adds hide_navigation_bar to GetIFrameRequest, which only suppresses the top bar. It is negative-sense so the proto3 zero value preserves behavior for every existing caller.
  • Access scoping is untouched — overrideResources in admin/server/deployment.go is unchanged, so the Canvas drill-through keeps working as it does with navigation: true today.
  • EmbedStore.navigationBarEnabled is derived as navigationEnabled && hide_navigation_bar !== "true". The bar is still always hidden when navigation is false, since a JWT scoped to one resource cannot serve the breadcrumbs or the project listing.
  • Browser back/forward suppression and the navigation postMessage notification stay gated on navigation, not on the bar, so drill-through still notifies the host page.
  • Adds a --hide-navigation-bar flag to rill sudo embed open.

Resulting behavior:

navigation hide_navigation_bar Navigation bar Canvas → Explore
false false / omitted Hidden Hidden
false true Hidden Hidden
true false / omitted Shown Shown
true true Hidden Shown

The last row is the new capability. Note that in that mode there is no in-iframe affordance for returning from a dashboard the user drilled into; the host page is expected to listen for the navigation notification and provide its own way back. This is called out in the docs.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

https://claude.ai/code/session_01P3aBLYwJXg7FEw4nTvkRJW

The embed `navigation` param conflated two concerns: whether the runtime
JWT is scoped to a single resource, and whether Rill's own navigation
chrome renders. Embedders who wanted a chrome-free embed had to set
`navigation: false`, which also removed the drill-through from a Canvas
component to an Explore dashboard.

Add `hide_navigation_bar`, which only suppresses the top bar. Access
scoping is untouched, so the Canvas drill-through keeps working. The bar
is still always hidden when `navigation` is false, since a JWT scoped to
one resource cannot serve the breadcrumbs or the project listing.

Claude-Session: https://claude.ai/code/session_01P3aBLYwJXg7FEw4nTvkRJW
The new hidden-navigation-bar test took the canvas's first "Go to ..."
button, which belongs to the leaderboard component, while hovering the
KPI grid. The toolbar is revealed by `group-hover` on the owning
component, so the button it asserted on was never shown.

Claude-Session: https://claude.ai/code/session_01P3aBLYwJXg7FEw4nTvkRJW
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.

2 participants