These changes mean that it is now possible to configure the web component not to load a logged-in user's remixed version of the project by setting load_remix_disabled to true.
We want to use this in editor-standalone with the web component editor so that we reproduce the behaviour currently in editor-ui with the integrated editor.
When the new attribute is set to true, the loadRemix property passed to useProject in WebComponentLoader is forced to be false so that the remixed version of the project will not be loaded.
The name of the new attribute isn't ideal - I would rather have used load_remix_enabled - however, boolean attributes of the web component default to false and I want the default behaviour to remain unchanged to avoid breaking the projects-ui app.
I've opened this draft PR on editor-standalone to illustrate the changes I plan to make. I'm hoping to add some end-to-end/integration tests in that repo to verify the new behaviour.
Screencast showing the fix in action in my local version of editor-standalone with the new load_remix_disabled attribute of the editor web component set to true in the Project & MobileProject components.
This work came out of this issue.
These changes mean that it is now possible to configure the web component not to load a logged-in user's remixed version of the project by setting
load_remix_disabled
totrue
.We want to use this in
editor-standalone
with the web component editor so that we reproduce the behaviour currently ineditor-ui
with the integrated editor.When the new attribute is set to
true
, theloadRemix
property passed touseProject
inWebComponentLoader
is forced to befalse
so that the remixed version of the project will not be loaded.The name of the new attribute isn't ideal - I would rather have used
load_remix_enabled
- however, boolean attributes of the web component default tofalse
and I want the default behaviour to remain unchanged to avoid breaking theprojects-ui
app.I've opened this draft PR on
editor-standalone
to illustrate the changes I plan to make. I'm hoping to add some end-to-end/integration tests in that repo to verify the new behaviour.Screencast showing the fix in action in my local version of
editor-standalone
with the newload_remix_disabled
attribute of the editor web component set totrue
in theProject
&MobileProject
components.https://github.com/RaspberryPiFoundation/editor-ui/assets/3169/3f94dc06-f828-49f0-95f4-40848ec234bc