Merge updates to Stratus - support live editing#835
Conversation
- add cacheTime busting on stratus bundle loading - IMPORTANT! don't forget to npm publish - ToDo: npm publish packages: angular, angularjs, stratusjs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6654bce485
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Remove client-computed / read-only fields before autosave logic reacts | ||
| changeSet = this.sanitizeReadOnlyPatchPayload(changeSet) | ||
|
|
||
| if (!isEmpty(this.patch)) { | ||
| this.patch = this.sanitizeReadOnlyPatchPayload(this.patch) |
There was a problem hiding this comment.
Recompute changed flag after sanitizing read-only patch
After super.handleChanges() runs, this.changed is already derived from the unsanitized patch; if the only differences are read-only fields, lines 463-467 clear changeSet/this.patch but never reset this.changed to false. That leaves the model permanently marked dirty for non-savable edits, so consumers that gate behavior on model.changed (for example the AngularJS Froala directive’s accept() path) still react as if there is a writable change.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
What is the recommended new lines of code please?
| if (!parent || !isObject(parent) || !has(parent, part)) { | ||
| parent = null | ||
| break | ||
| } | ||
| parent = parent[part] |
There was a problem hiding this comment.
Resolve nested path segments when removing read-only fields
The traversal mixes lodash path-aware checks (has(parent, part)) with direct property access (parent = parent[part]), which breaks for bracket-style segments such as items[0]. In those cases the guard passes but parent[part] is undefined, so the read-only field is not removed and can still be sent in patch payloads when array-indexed read-only paths are configured.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
what is the recommended new code block?
No description provided.