You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say an element has path with content, say /post/1, and loads this content in, then the path changes to a new (empty) path: /post/2 - there is no content and the buffer is clean, so this will load the 'static' content, which is actually the old content set from /post/1.
Should we purge the contents of the element before loading in /post/1? Should we have smarter 'static content' loading? e.g. know when it's static and set by dev, know when its been input by user, know when it's been loaded by the behavior itself and not changed.
The text was updated successfully, but these errors were encountered:
👍 Yes. Remember discussing this previously, and thought it was fixed in Simpla 2. Setting a path should always set the content of that path, if that content is null then it should be empty.
Static content is a separate case - the change from undefined to /some/path. If /some/path doesn't have data, the element should show nothing. If someone sets the path back to undefined, it should show static content (though that's a pointless use-case, so wouldn't worry about actually supporting it, just demonstrating the logic)
Cool. Because yeah also keep in mind that static content is only for dev, we recommend strongly not using it in prod. So it doesn't need to be robust, just a way to initialise content for an element.
Say an element has path with content, say
/post/1
, and loads this content in, then the path changes to a new (empty) path:/post/2
- there is no content and the buffer is clean, so this will load the 'static' content, which is actually the old content set from/post/1
.Should we purge the contents of the element before loading in
/post/1
? Should we have smarter 'static content' loading? e.g. know when it's static and set by dev, know when its been input by user, know when it's been loaded by the behavior itself and not changed.The text was updated successfully, but these errors were encountered: