-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Documents: Use single-transaction create/update-and-publish endpoints (FE) #23031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iOvergaard
wants to merge
10
commits into
v17/improvement/save-and-publish-take-three
Choose a base branch
from
v17/feature/68071-save-and-publish-fe
base: v17/improvement/save-and-publish-take-three
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
89d8985
Documents: Use single-transaction create/update-and-publish endpoints…
iOvergaard c25740b
Merge remote-tracking branch 'origin/v17/improvement/save-and-publish…
iOvergaard 3fb8ac4
Documents: Address review feedback on save-and-publish FE
iOvergaard 149d77f
Documents: Drop redundant document re-read on save-and-publish
iOvergaard 2eeb9d4
Documents: Fix spurious discard dialog after create-and-publish
iOvergaard 368da35
Documents: Move create/update-and-publish into the publishing domain
iOvergaard 3fa459b
Documents: Drop redundant context guard in save-and-publish orchestrator
iOvergaard 9cbd92b
Documents: Reconcile current as well as persisted in finalizeCreate
iOvergaard ad059a0
Documents: Align finalizeUpdate with finalizeCreate and tighten metho…
iOvergaard 95f7f16
Merge branch 'v17/improvement/save-and-publish-take-three' into v17/f…
iOvergaard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 45 additions & 1 deletion
46
src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts
Large diffs are not rendered by default.
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
src/Umbraco.Web.UI.Client/src/packages/core/backend-api/types.gen.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is something about this part that we need to look into.
I did a little bit of investigation on it, and from how things works with Discard Changes, then this seems like the only option. But to me there is a lot of arrows pointing towards how the Dicard Changes mechanisme works.
The reason why it itches a bit, from an architectural standpoint, is that for un-saved variants we shortly change it to be like it is on the server and then revert back to the client-draft. To avoid the Discard Changes, I would rather like the discard changes to understand that switching between Create/Edit should not trigger the check for unsaved changes logic.
I would like to dive further into this at one point, but this is currently my only comment on this PR, so putting it here to leave that thought available for who comes around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right — and that reconcile-then-revert is the bit that bugs me too, not just you. Presenting an unsaved variant as the server state for a split second and then flipping it back is the kind of thing that works but never sits quite right. Agree the real fix is teaching the guard that Create→Edit isn't a navigate-away, rather than dancing around it out here. Didn't want to drag it into this PR though since it's shared infra (media and the rest go through the same redirect), so I've split it out: #23086. Thanks for digging into it 🙂