Skip to content

SF-3332 Prevent user from deleting footnotes#3915

Open
RaymondLuong3 wants to merge 1 commit into
masterfrom
fix/sf-3332-footnote-delete
Open

SF-3332 Prevent user from deleting footnotes#3915
RaymondLuong3 wants to merge 1 commit into
masterfrom
fix/sf-3332-footnote-delete

Conversation

@RaymondLuong3

@RaymondLuong3 RaymondLuong3 commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Users were previously allowed to make a selection that included a cross reference or footnote. We do not want to allow users to select these notes which they would then be able to overwrite or delete. This PR introduces logic to identify notes contained in a collection and update the selection be come before the notes.


This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label May 29, 2026
@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.03%. Comparing base (dfb04af) to head (d2463c8).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...re/ClientApp/src/app/shared/text/text.component.ts 88.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3915      +/-   ##
==========================================
- Coverage   81.04%   81.03%   -0.02%     
==========================================
  Files         645      645              
  Lines       41434    41450      +16     
  Branches     6748     6730      -18     
==========================================
+ Hits        33581    33589       +8     
- Misses       6747     6764      +17     
+ Partials     1106     1097       -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@RaymondLuong3 RaymondLuong3 marked this pull request as draft May 29, 2026 20:49
@RaymondLuong3 RaymondLuong3 force-pushed the fix/sf-3332-footnote-delete branch from 0ceb41d to d2463c8 Compare July 2, 2026 20:26
@RaymondLuong3 RaymondLuong3 marked this pull request as ready for review July 2, 2026 21:33
@marksvc marksvc self-assigned this Jul 3, 2026
@marksvc

marksvc commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This is reviewable in Devin Review.

@marksvc marksvc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marksvc reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on RaymondLuong3).


src/SIL.XForge.Scripture/ClientApp/src/app/shared/text/text.component.ts line 1955 at r1 (raw file):

        textualNoteIndex += op.insert.length;
      } else if (op.insert != null && typeof op.insert === 'object') {
        if (op.insert['note'] != null) break;

I would expect that other embeds can likewise be deleted, not just footnotes. Do we have reason to believe that it's only notes that are affected by the bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants