-
Notifications
You must be signed in to change notification settings - Fork 482
frontend: Live-sync editor with server updates and add merge option #4269
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kahirokunn The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
8b191b6 to
22b5e83
Compare
409c38b to
dabe9e5
Compare
dabe9e5 to
6dfc8cd
Compare
|
@joaquimrocha The code has a bit too many lines, but I think this is the ideal editor from a user experience perspective. What do you think? My idea is that if the server-side YAML changes, it will eventually cause an optimistic lock error. Therefore, I think it would be a better experience to reflect the server-side YAML to some extent automatically in the editor. |
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
6dfc8cd to
4b11025
Compare
|
I think this is likely too complex for us to have it in time for this week's release, but let's try for the next one (and review it as soon as we can). |
|
I think the source code might have even more room for improvement, but I believe the PR and the video effectively convey what we're aiming to achieve. Please let me join in on this challenge together! 💪 |
|
fiy there's also a somewhat related PR that we should make sure it'll work nicely together #4098 |
Summary
This PR improves the resource YAML editor behavior when the underlying resource changes on the server. If the user hasn’t typed anything yet, the editor auto-updates to the latest YAML. If the user has started editing, the editor won’t overwrite changes and instead shows an accessible warning with actions to reload or merge changes.
Related Issue
Fixes #XXXX
Changes
EditButton/EditorDialogso the editor follows live server updates when not dirty.Steps to Test
Screenshots
Notes for the Reviewer
status,metadata.managedFields, andmetadata.resourceVersionto reduce noisy conflicts.