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

[Hold for Payment 30th July] Upgrade react-native-render-html to latest (6.0.0-beta.8) #3951

Closed
jsamr opened this issue Jul 9, 2021 · 25 comments
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@jsamr
Copy link
Collaborator

jsamr commented Jul 9, 2021

This is a follow-up on a conversation I had with @puneetlath. The Foundry release has entered beta stage recently, and thus has stabilized a lot. I am confident that the official 6.0.0 release should be ready at some point this summer. Relevant resources to read: Announcing the Beta Foundry Release, Changelog

Benefits

Currently, Expensify.cash is using the 6.0.0-alpha.10 version, which lags behind a few important breaking changes and enhancements. The main advantages of integrating this new release:

  • Test coverage has been risen significantly in the main repository (jest reports > 98%)
    image
  • API has stabilized a lot and it not expected to change before final release.
  • Many little performance improvements (check the changelog referred above).
  • The API is documented in depth which is great for contributors, check out documentation website.

Planning

  • Upgrade version to latest beta and adapt code where required to keep the same level of functionality;
  • Test all tags to make sure nothing breaks;
  • Review best practices regarding react-native-render-html usage, and include refactorings to enforce those best practices.

Upwork job post: https://www.upwork.com/jobs/~01214906855dec6aa3

@jsamr jsamr added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 9, 2021
@MelvinBot
Copy link

Triggered auto assignment to @johncschuster (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 9, 2021
@parasharrajat
Copy link
Member

parasharrajat commented Jul 9, 2021

Thanks, @jsamr for such a great lib. I am moving with a solution on PR #3869.
But I am not covering Review best practices regarding react-native-render-html usage, and include refactorings to enforce those best practices..

@MelvinBot
Copy link

Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@jsamr
Copy link
Collaborator Author

jsamr commented Jul 9, 2021

@parasharrajat Thank you for this update! As I've just stated in your PR, I don't think disabling whitespace collapsing is a good idea since originally I was hired to implement whitespace collasing in the engine! Moreover, the amount of testing should be significant since we must make sure all tags are rendered as expected.

@parasharrajat
Copy link
Member

parasharrajat commented Jul 9, 2021

Ok. I see. But we want to fix the spaces issue. Any solution for that issue. Holding that PR for further investigation.

@jsamr
Copy link
Collaborator Author

jsamr commented Jul 9, 2021

@parasharrajat Preserving spaces for the specific use case laid out it #3859 is really a matter of design choice, so it should be discussed with a product owner. If you type 3 spaces in this very Github markdown editor, spaces will be collapsed. To preserve spaces, one should explicitly use a preserving space block such as <pre> (or create a custom tag which has a whitespace: 'pre' style applied to it). I don't know of any chat app that behaves like this, but as I said, it's just a matter of opinion. In any case, that should be handled at the Markdown → HTML conversion level!

@parasharrajat
Copy link
Member

parasharrajat commented Jul 9, 2021

Yeah. Clearly. But there was no straight way to do it. We may need to add <p> Tags on our parsing and then break each line of text to <p>. Not sure if this works.

@marcaaron
Copy link
Contributor

Proposal looks good to me.

I'm not sure how you all want to handle the open PR to bump, but I think we should let @jsamr do the transition and then we can see what additional changes are necessary (full disclosure, I'm not up to date on what changes you are proposing there @parasharrajat).

@marcaaron marcaaron added the External Added to denote the issue can be worked on by a contributor label Jul 9, 2021
@MelvinBot
Copy link

Triggered auto assignment to @trjExpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@MelvinBot MelvinBot added the Daily KSv2 label Jul 9, 2021
@marcaaron marcaaron assigned jsamr and unassigned marcaaron Jul 9, 2021
@marcaaron
Copy link
Contributor

@trjExpensify maybe can sync with @puneetlath before creating the job

@parasharrajat
Copy link
Member

@marcaaron I good with @jsamr handling the Migration. The issue I am trying to solve does require this migration. I have put that PR on hold.

@jsamr
Copy link
Collaborator Author

jsamr commented Jul 9, 2021

@marcaaron All good! I've just created a profile on Upwork, just need to wait for review before I can apply when the job is ready!

@MelvinBot
Copy link

Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@trjExpensify
Copy link
Contributor

@tgolen
Copy link
Contributor

tgolen commented Jul 13, 2021

Sounds like maybe I don't need to do anything here? I've been a little out-of-the-loop on this one. Sounds like we're gonna go ahead and hire jsamr though, so yay!

@tgolen tgolen removed their assignment Jul 13, 2021
@marcaaron marcaaron self-assigned this Jul 14, 2021
@marcaaron
Copy link
Contributor

I'd like to review these changes when they are ready thanks :)

@jsamr
Copy link
Collaborator Author

jsamr commented Jul 14, 2021

@marcaaron
Copy that!

@trjExpensify
Copy link
Contributor

Hired! 👍

@puneetlath
Copy link
Contributor

Reopening to ensure this gets paid out if no regressions.

@parasharrajat
Copy link
Member

There is one regression on this PR. If we resize the browser app crashes. Somehow HTML source is being set to undefined and shallow matching of the prop is failing where it's trying to covert the undefined to object.

@jsamr
Copy link
Collaborator Author

jsamr commented Jul 26, 2021

@parasharrajat Yeah I think the current version is stricter and doesn't allow undefined. But since the html prop is required in the surrounding component BaseRenderHTML, I would assume that is the contract for this component.

html: PropTypes.string.isRequired,

As I have not touched other parts aside from src/components/RenderHTML, I would guess the bug comes from another component consuming this one.

@MelvinBot MelvinBot removed the Overdue label Jul 26, 2021
@trjExpensify trjExpensify changed the title Upgrade react-native-render-html to latest (6.0.0-beta.8) [Hold for Payment 30th July] Upgrade react-native-render-html to latest (6.0.0-beta.8) Jul 27, 2021
@parasharrajat
Copy link
Member

@jsamr Thanks for the context. I will look into it.

@parasharrajat
Copy link
Member

Sorry for the confusion but it seems that was no issue. npm install fixed it.

@marcaaron
Copy link
Contributor

Melvin shoo!

@MelvinBot MelvinBot removed the Overdue label Jul 29, 2021
@trjExpensify
Copy link
Contributor

Paid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants