Conversation
6f2c5eb to
e38acac
Compare
| :server-error="fields[field.name].serverError" | ||
| :doc-id="docId" | ||
| :generation="generation" | ||
| @update:model-value="updateNextAndEmit" |
There was a problem hiding this comment.
We now watch fieldState instead
|
|
||
| this.$emit('submit', { | ||
| name: this.subform.name, | ||
| values: this.docFields.data |
There was a problem hiding this comment.
Made this change because the old version wasn't resetting triggerValidation to false when no errors.(Probably the modal closes anyway but cleaner).
There was a problem hiding this comment.
I'm afraid this might say I can submit the form multiple times too if the form is still open.
There was a problem hiding this comment.
It wasn't done here I think because the modal was closed right after so not a big deal.
In the other locations we normally set it back to false after having awaited the nextTick.
You mean resetting the value would allow to submit the form with errors ? I don't think so, triggerValidation and errors are independent, But I agree it's pretty weird that we reset it only if no errors.. it should behave like the function I think:
triggerValidate() {
this.triggerValidation = true;
this.$nextTick(async () => {
this.triggerValidation = false;
});
}
This system is far from ideal thought.
| "uploadfs": "^1.25.1", | ||
| "void-elements": "^3.1.0", | ||
| "vue": "^3.3.8", | ||
| "vue": "^3.5.20", |
There was a problem hiding this comment.
I updated for the vue watcher deep feature to be available. Tests are green.
There was a problem hiding this comment.
btw our regression tests always do the equivalent of "npm update" (or a fresh install without package lock), so they would not have passed anyway before this if they were incompatible with latest vue 3.x.
Your change does make sense however, to force the update of vue to the version you need when clients update apostrophe.
| * Fixes a bug in the login `uponSubmit` filter where a user could login without meeting the requirement. | ||
|
|
||
| ### Fixes | ||
|
|
| }, | ||
| value: { | ||
| data: this.modelValue.data[item.name] | ||
| }, |
b009bad to
eeaf472
Compare
|
|
||
| this.$emit('submit', { | ||
| name: this.subform.name, | ||
| values: this.docFields.data |
|
|
||
| this.$emit('submit', { | ||
| name: this.subform.name, | ||
| values: this.docFields.data |
There was a problem hiding this comment.
I'm afraid this might say I can submit the form multiple times too if the form is still open.
| this.next.fieldState = { ...this.fieldState }; | ||
| this.$emit('update:model-value', this.next); |
There was a problem hiding this comment.
Are those 2 lines equivalent to what we had before with ...this.next?
There was a problem hiding this comment.
This line was already there:
this.next.fieldState = { ...this.fieldState };
For the emit I removed the spread because it's already done in the parent that spreads value.data and is useless I think. (we can keep it if you have a doubt).
updateDocFields(value) {
this.updateFieldErrors(value.fieldState);
this.docFields.data = {
...this.docFields.data,
...value.data
};
}
ValJed
left a comment
There was a problem hiding this comment.
Rollbacked what you asked for.
|
|
||
| this.$emit('submit', { | ||
| name: this.subform.name, | ||
| values: this.docFields.data |
| * Removes the non-functional `uniqueUsername` route from the `user` module | ||
| * Updated dependencies to address deprecation warnings. | ||
|
|
||
| * Refactors complex logic from `AposSchema` that handle data updates to simplifies it. |
There was a problem hiding this comment.
will need to be placed at the top after the merge of main
498b9e9 to
1451de3
Compare
* main: Pro 8230 improve schema (#5044)

PRO-8230
Summary
Simplifies complex and not working code, see ticket for more info.
What are the specific steps to test this change?
Should work like before:
Cypress 🟢
What kind of change does this PR introduce?
Make sure the PR fulfills these requirements: