V13: Read only mode while saving#16961
Merged
leekelleher merged 2 commits intov13/devfrom Aug 27, 2024
Merged
Conversation
leekelleher
approved these changes
Aug 27, 2024
Member
leekelleher
left a comment
There was a problem hiding this comment.
Tested out, works as expected. 👍
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #15996
This PR. turns a document/node into read only mode while saving.
This prevent making changes while saving, because when done saving we reset everything till the state of the latest saved data.
This gives a better solution in general, try testing this with a normal text box.
The issue mentioned above, is not necessary fixed by this, cause that case is just opening a Block while saving(Not necessary editing it while its still saving). This PR will then leave the user with a Block Modal opened as in read only mode, where we have removed the Submit button. Potentially leaving the user a little confused, but having hidden away the problem. Let me describe furhter:
The main problem is that Blocks are edited via Modals, and the Modal is based on data given when it was opened, and that data is changed/re-instantiated when new data gets back. Meaning the connection between the two is broken. This is complex to fix. As well this would work with this PR. updating the Modal so the Submit button appears once readonly mode is disabled again.
This would be what we should have fixed, but that is a big task, and is not a problem in v.14 therefore I decided to down prioritize such. To accept that the user opens a block for editing while saving, will be left without the option to edit it. — Which at least makes the issue visible to the user.
Prerequisites
If there's an existing issue for this PR then this fixes
Description