Skip to content

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

Closed

Description

@jsamr

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

Activity

  1. added
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Jul 9, 2021
  2. MelvinBot commented on Jul 9, 2021

    @MelvinBot
    Contributor

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

  3. removed
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Jul 9, 2021
  4. parasharrajat commented on Jul 9, 2021

    @parasharrajat
    Member

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

  5. MelvinBot commented on Jul 9, 2021

    @MelvinBot
    Contributor

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

  6. jsamr commented on Jul 9, 2021

    @jsamr
    ContributorAuthor

    @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.

  7. parasharrajat commented on Jul 9, 2021

    @parasharrajat
    Member

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

  8. jsamr commented on Jul 9, 2021

    @jsamr
    ContributorAuthor

    @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!

  9. parasharrajat commented on Jul 9, 2021

    @parasharrajat
    Member

    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.

  10. 22 remaining items

  11. puneetlath commented on Jul 26, 2021

    @puneetlath
    Contributor

    Reopening to ensure this gets paid out if no regressions.

  12. parasharrajat commented on Jul 26, 2021

    @parasharrajat
    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.

  13. jsamr commented on Jul 26, 2021

    @jsamr
    ContributorAuthor

    @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.

  14. 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)[/+] on Jul 27, 2021
  15. parasharrajat commented on Jul 27, 2021

    @parasharrajat
    Member

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

  16. parasharrajat commented on Jul 27, 2021

    @parasharrajat
    Member

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

  17. marcaaron commented on Jul 29, 2021

    @marcaaron
    Contributor

    Melvin shoo!

  18. trjExpensify commented on Jul 31, 2021

    @trjExpensify
    Contributor

    Paid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions