Skip to content

Conversation

@GovernmentPlates
Copy link
Member

@GovernmentPlates GovernmentPlates commented Feb 21, 2024

Closes: #3410

This PR shows a dialog to the user when a concurrent edit to the note (that the user is editing) is made which gives the user an option to either:

  • Overwrite the changes of the newer edit to the note
  • Discard their changes
  • Or cancel and return back to the editing screen (thereby not resolving the conflict)

TODO:

  • UI & frontend logic
  • Backend/Server-side checks
  • Clean up
  • Fix tests
  • Changelog

@GovernmentPlates GovernmentPlates self-assigned this Feb 21, 2024
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch from 7df2fa8 to 4150d50 Compare March 1, 2024 12:30
@GovernmentPlates GovernmentPlates marked this pull request as draft March 1, 2024 12:31
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch 2 times, most recently from 36d46b7 to dc71835 Compare March 5, 2024 16:37
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch from dc71835 to c71c149 Compare March 13, 2024 10:13
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch 2 times, most recently from 1eb92a3 to 8b19929 Compare March 14, 2024 16:49
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch from 8b19929 to a8aa53f Compare March 15, 2024 15:17
@GovernmentPlates GovernmentPlates changed the title Avoid conflicts with concurrent edit of notes Avoid conflicts with concurrent edit of minutes Mar 15, 2024
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch from a8aa53f to c8a134e Compare March 15, 2024 15:28
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch 5 times, most recently from 52580fb to 92c77ca Compare March 15, 2024 20:51
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch 3 times, most recently from bea6db3 to 4b21658 Compare March 27, 2024 10:23
@ThiefMaster ThiefMaster force-pushed the master branch 2 times, most recently from 552297c to a46dd5e Compare March 27, 2024 10:27
@GovernmentPlates GovernmentPlates force-pushed the 3410-Fix-Notes-Conflicts branch from 24ad157 to a1667fa Compare March 27, 2024 11:18
@GovernmentPlates GovernmentPlates marked this pull request as ready for review March 27, 2024 11:18
This fixes an edge case where the conflict detection was not correctly triggered during the simultaneous edit of a new note, as well as fixing a case where attempting to create a new note revision after a deletion would raise an error. Unit tests were also re-written to validate this.
Apply changes/suggestions from review, as well as some minor visual
improvements
- Hide scrollbar if note content is not large enough
- Close both the conflict and note editor modal when the overwrite
  action is triggered
* Refactor frontend conflict action logic
* Convert markdown -> HTML on conflict
* Reword conflict message on UI
* Show relative last modified timestamp instead
@ThiefMaster ThiefMaster force-pushed the 3410-Fix-Notes-Conflicts branch from 17e1253 to b77c6cb Compare April 18, 2024 11:22
This fixes a bug where markdown mins were not being correctly rendered in the conflict modal
The `box-shadow` used by SUI to seperate columns seems to be buggy on firefox - this fix overrides this seperator style with a typical `border-left` instead.
@ThiefMaster ThiefMaster force-pushed the 3410-Fix-Notes-Conflicts branch from b77c6cb to d3ab19b Compare April 18, 2024 11:23
@ThiefMaster ThiefMaster added this to the v3.3 milestone Apr 18, 2024
@ThiefMaster ThiefMaster enabled auto-merge (squash) April 18, 2024 12:07
@ThiefMaster ThiefMaster merged commit 9d40d1d into indico:master Apr 18, 2024
@ThiefMaster ThiefMaster deleted the 3410-Fix-Notes-Conflicts branch April 18, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid conflicts with concurrent edits of notes

4 participants