retoolContext.inEditorMode is not set correctly until you refresh

If you open an app either from the Edit button on the homepage or from the top right navbar when in preview mode it doesn't set the retoolContext.inEditorMode to true.

It's corrected only after a refresh while in editor mode.

3 Likes

@minijohn

Thanks for pointing this out! We currently have a bug report for this, I tied it to this thread and will update you when progress is made :slightly_smiling_face:

2 Likes

Legend, thanks!

@lauren.gus is there any update on this topic? retoolContext.inEditorMode appears still to be broken.
Is there any workaround how I can find out whether the user views the app in user mode or in edit mode?

2 Likes

@lauren.gus - also running into this issue. Using workarounds for now, but would definitely make our lives much happier :slight_smile:

1 Like

@letsmod_alex What's your workaround? Using the urlparams?

I'd also like to know your workaround(s), @letsmod_alex !

Yes, exactly @minijohn, @dguzzo - some easy hack like {{(urlparams.href).includes('/editor/')}} will return true/false.

Another hacky way is to check {{retoolContext.pageTag}} - it is empty when viewed through a published public link... It is supposed to show the version of the deployed app, but it doesn't. Funny enough - it's another bug (I sent a report to lauren.gus) - but it can be used to see if the user is accessing it live...

2 Likes

Hey folks! Just want to report back here that this behavior should be fixed as of 1.102.0!

2 Likes