Skip to content

[No QA] Cleanup implementation of HTMLEngineProvider#6885

Merged
stitesExpensify merged 14 commits intomainfrom
Rory-CleanupHtmlEngineProvider
Jan 19, 2022
Merged

[No QA] Cleanup implementation of HTMLEngineProvider#6885
stitesExpensify merged 14 commits intomainfrom
Rory-CleanupHtmlEngineProvider

Conversation

@roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Dec 22, 2021

Details

This PR cleans up the HTMLEngineProvider component implementation to make it align with the one-component-per-file convention we have throughout the rest of our codebase. There was a seemingly arbitrary exception made in HTMLEngineProvider, and it made the component very large and harder to scan/reason about.

Fixed Issues

$ n/a

Tests

  1. Open a chat
  2. Send a text-only message. Verify that it renders correctly.
  3. Edit the text-only message. Verify that the edit box appears correctly and that you can edit the message.
  4. Send an image attachment. Verify that it renders correctly.
  5. Send an inline code block. Verify that it renders correctly.

QA Steps

Just regression tests.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@roryabraham roryabraham changed the title Cleanup implementation of HTMLEngineProvider [No QA] Cleanup implementation of HTMLEngineProvider Dec 28, 2021
# Conflicts:
#	src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js
@roryabraham roryabraham self-assigned this Dec 28, 2021
@roryabraham roryabraham marked this pull request as ready for review January 4, 2022 22:54
@roryabraham roryabraham requested a review from a team as a code owner January 4, 2022 22:54
@MelvinBot MelvinBot requested review from stitesExpensify and removed request for a team January 4, 2022 22:55
@roryabraham
Copy link
Contributor Author

Merged main again to keep up-to-date and make sure tests pass, but there were no conflicts. Small bump @stitesExpensify

Copy link
Contributor

@stitesExpensify stitesExpensify left a comment

Choose a reason for hiding this comment

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

LGTM, good cleanup IMO!

@stitesExpensify stitesExpensify merged commit 7dfe96f into main Jan 19, 2022
@stitesExpensify stitesExpensify deleted the Rory-CleanupHtmlEngineProvider branch January 19, 2022 01:26
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @stitesExpensify in version: 1.1.31-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @AndrewGable in version: 1.1.32-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

if (!HTMLEngineUtils.isInsideComment(props.tnode)) {
// This is not a comment from a chat, the AnchorForCommentsOnly uses a Pressable to create a context menu on right click.
// We don't have this behaviour in other links in NewDot
// TODO: We should use TextLink, but I'm leaving it as Text for now because TextLink breaks the alignment in Android.
Copy link
Contributor

Choose a reason for hiding this comment

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

Coming from this issue #80349 we should use TextLink instead of Text. I couldn't reproduce any Android issues when using it, so I think it's safe to make this change now unless someone has counterexamples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really old PR, totally possible the alignment issue I described doesn't happen anymore. I'd say update it to use TextLink

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