Add plumbing to let InlineEditorView save without triggering events.
Review Request #13042 — Created May 11, 2023 and submitted — Latest diff uploaded
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:
ReviewRequestEditorView
callsfinishSave
for each open field.- The field calls
InlineEditorView.submit
.InlineEditorView.save
triggers the "complete" event.- "complete" is handled by the field view, which calls
ReviewRequestEditor.setDraftField
ReviewRequestEditor.setDraftField
callsReviewRequestDraft.save
with the new data.- As each of the fields are saved,
ReviewRequestEditor
is keeping
track via apendingSaveCount
attribute, which will trigger a new
call topublishDraft
once 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.