Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove splitting ranges on emojis on the web #598

Merged
merged 6 commits into from
Jan 20, 2025

Conversation

Skalakid
Copy link
Collaborator

@Skalakid Skalakid commented Jan 15, 2025

Details

This PR fixes the problem with triplicating syntaxes inside the Live Markdown Input, by removing range-splitting logic from the web platform and replacing it with the fix based on CSS styles. In the future, we will focus on fixing the web parser to support splitting emojis among all other styles (especially inline code block) and properly handle tag hierarchy edge cases when building HTML structure.

Related Issues

Expensify/App#55115

Manual Tests

  1. To the text that contains emojis, add italics styling, e.g. _🥰 test 😇 test 🥹_
  2. Verify if the text has italics style and emojis don't
  3. Verify if it still works when adding other styles around it, e.g. # *~_🥰 test 😇 test 🥹_~*
  4. Verify if emojis aren't strikethrough
  5. Test it with different style combinations

Linked PRs

#597

BartoszGrajdek
BartoszGrajdek previously approved these changes Jan 16, 2025
Copy link
Collaborator

@BartoszGrajdek BartoszGrajdek left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻

One problem I have is that it's not possible to use CMD + ➡️ when the cursor is in front of emoji. (not sure if that's a blocker cc @tomekzaw)

SR
Screen.Recording.2025-01-16.at.16.17.18.mov

src/parseExpensiMark.ts Outdated Show resolved Hide resolved
src/parseExpensiMark.ts Outdated Show resolved Hide resolved
Co-authored-by: Tomek Zawadzki <tomekzawadzki98@gmail.com>
@Skalakid Skalakid force-pushed the @Skalakid/fix-splitting-emojis-on-web branch from d96bd19 to b57de63 Compare January 20, 2025 07:33
@Skalakid Skalakid merged commit 8d7d2c4 into main Jan 20, 2025
5 checks passed
@Skalakid Skalakid deleted the @Skalakid/fix-splitting-emojis-on-web branch January 20, 2025 09:03
@os-botify
Copy link
Contributor

os-botify bot commented Jan 20, 2025

🚀 Published to npm in 0.1.220 🎉

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.

4 participants