Skip to content

Conversation

@pmachapman
Copy link
Collaborator

@pmachapman pmachapman commented Sep 28, 2025

This fixes a race condition on editor load where in some circumstances Lynx insights were inserted before the notes were added, resulting in an inability for notes to be reformatted (i.e. the removing of the highlight state) when they were enclosed by a lynx insight.

As notes are embed blots, not inline or block blots, they should not contain an inline blot. However, as the note thread may still end up being wrapped by a lynx insight's inline embed if a note is inserted within its bounds either by sync or user action, I implemented a default appendChild function for the note thread embed blot, which will quietly drop the event (as the embed blot cannot render an inline blot inside it anyway).


This change is Reviewable

@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Sep 28, 2025
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.19%. Comparing base (6f977db) to head (3129f2d).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3473   +/-   ##
=======================================
  Coverage   82.19%   82.19%           
=======================================
  Files         615      615           
  Lines       36995    36995           
  Branches     6064     6040   -24     
=======================================
  Hits        30409    30409           
- Misses       5689     5703   +14     
+ Partials      897      883   -14     

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

@RaymondLuong3 RaymondLuong3 self-assigned this Oct 10, 2025
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

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

This seems to be working well and there is no longer an error that appears. I did see a different issue where the insight at the first character of a verse will highlight the note when it appears. It is related but I don't think it should stop this PR from going through. I opened SF-3608.

image.png

@RaymondLuong3 reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @pmachapman)

@RaymondLuong3 RaymondLuong3 added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Oct 10, 2025
@RaymondLuong3 RaymondLuong3 merged commit 8c23863 into master Oct 15, 2025
22 of 23 checks passed
@RaymondLuong3 RaymondLuong3 deleted the fix/SF-3565 branch October 15, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants