View Only mode for Editors

it would be great if one could opt-out or hide the black edit bar on top, even if the user is an editor. just for a nicer experience in the day-to-day use of an app. thanks

1 Like

I completely agree, that top bar is pretty ugly and often unnecessary.

Here's a workaround that works for me but I have a feeling the class name for your top bar could be different as this one is rather odd:

._37GzR {
  height: 0px !important;
  overflow: hidden !important;
}
.presentation-canvas-padding .retool-canvas-container--with-app-shell {
    margin-top: 0px !important;
}

Hey @dzear! Thanks for posting that workaround :slightly_smiling_face:

For reference - you can also try setting the _embed or _hideNav URL parameters to true for your app!

1 Like

Thanks that worked well! Adding that as a flag on the navigation component would be great, as switching to a new app will reset the URL.

Hey @ff58!

Does it work if you use a custom link and set the flag in the associated event handler?

1 Like

Thanks, @Kabirdas, that worked!

I've also noticed a small bug with the nested menu, sometimes it closes, and other times it remains open.

Screen Recording 2023-01-14 at 02.26.00

:thinking: something similar was recently reported, specifically for the hamburger menu. Are you seeing this in a mobile view of your app or is it happening on the desktop view?

recording was made on desktop.

Sorry about such a late reply here @ff58!

I'm curious to know more about the event handlers you have tied to each option. One reason it might be closing is that some properties of the component are getting recalculated. Is the idea that you'd like for it to always stay open?

Hey ! @ff58 @Kabirdas
I am actually interested in how did you manage to get the "_embed" option set to true inside the URL parameters of an app : following this setting it was not working for me...

I still managed to get this option working but only with a click handler like that :

I am using the self-hosted version of Retool, don't know if this could have an impact...

Thank you for you help :slight_smile:

Hey @Gabriel_Ferrier!

The URL parameters set using the first method you posted are hash parameters and _embed needs to be set specifically as a query parameter. As you've noticed you can do so in an event handler but it's also possible with one of the navigation utils. Let me know if that last option works :slightly_smiling_face: Otherwise, I'm curious to hear more about your use case!

1 Like

Hey @Kabirdas

Indeed I used the navigation utils inside a js querry to solve my problem !

Thank you for your response ! :smiley: