To reproduce:
1. Add a new content template then open the template in the editor frame.
2. Click Add in the sidebar (+ icon) and click "Create code component" to create a new code component
3. Creating a code component should open up the code editor. You can see that the content preview navigation is rendered in the top.
We use the selector selectEditorFrameContext
to determine whether we are on a template or entity. The TopBar correctly checks whether we are on a template to show the <ContentPreviewSelector/>
. However the value is incorrectly set to 'template' when the code editor is open because it doesn't get updated.
I believe all we need is in code-editor/Preview.tsx
, inside the useEffect without dependencies, we want to call setEditorFrameContext and set it to something else.
This might require introducing a third enum to EditorFrameContext
in uiSlice.ts. Either an "undefined" which acts as neither or adding a "CODE" enum.
Active
1.0
Page builder
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.