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
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.18%. Comparing base (7140f65) to head (f441aa6).
⚠️ Report is 23 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.18%   -0.01%     
==========================================
  Files         611      611              
  Lines       36449    36449              
  Branches     6000     6005       +5     
==========================================
- Hits        29959    29957       -2     
- Misses       5609     5611       +2     
  Partials      881      881              

☔ 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
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