SF-2481 Fix verse number order in RTL editor when text has numbers - #4089
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4089 +/- ##
=======================================
Coverage 80.94% 80.94%
=======================================
Files 664 664
Lines 42139 42139
Branches 6932 6932
=======================================
Hits 34111 34111
Misses 6865 6865
Partials 1163 1163 ☔ View full report in Codecov by Harness. |
|
📸 Screenshot diff deployed! (2 changes) View the visual diff at: https://pr-4089--sf-screenshot-diffs.netlify.app |
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/app/shared/text/text.component.spec.ts line 285 at r1 (raw file):
expect(verse3Marker.top).withContext('setup: verse 2 is all on one line').toEqual(verse2.top); expect(verse2Marker.left).toBeGreaterThanOrEqual(verse2.right); expect(verse3Marker.right).toBeLessThanOrEqual(verse2.left);
This is a neat way to determine that the verse markers and verse segment are in the right place. With DOM coordinates, the coordinate system starts are the top left and moves right and down. I may be worth mentioning that in a comment.
Code quote:
expect(verse2Marker.left).toBeGreaterThanOrEqual(verse2.right);
expect(verse3Marker.right).toBeLessThanOrEqual(verse2.left);15d5148 to
ce72ca7
Compare
Before
After
The actual fix is replacing
unicode-bidi: embedwithunicode-bidi: isolate. The replaced line was introduced in #661, while fixixng other layout/rendering bugs. As far as I can tell this doesn't bring any of them back, but it's worth paying attention to that original fix.I've added both a spec and a storybook file so screenshots of the editor are taken.
This change is