flake8
passed.
JSHint
passed.
Review Request #13042 — Created May 11, 2023 and submitted
In order to make the "save before publish" operation a little more
streamlined, I'm rearranging things so that it can be somewhat less
event driven. Right now, this involves:
ReviewRequestEditorViewcallsfinishSavefor each open field.- The field calls
InlineEditorView.submit.InlineEditorView.savetriggers the "complete" event.- "complete" is handled by the field view, which calls
ReviewRequestEditor.setDraftFieldReviewRequestEditor.setDraftFieldcallsReviewRequestDraft.save
with the new data.- As each of the fields are saved,
ReviewRequestEditoris keeping
track via apendingSaveCountattribute, which will trigger a new
call topublishDraftonce the count is zero.This is all unnecessarily complex, and involves making an API call per
field before we can publish, when we should be able to save all of the
data in a single go.This change is the first step in addressing this, allowing the inline
editor to save/submit without triggering that "complete" event, and
returning the new value instead.
Ran js-tests.
| Summary | ID |
|---|---|
| 3aa884d0a55b4af94f146074fd9eaa2656f7d268 |