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

fix(web): handle text input metrics correctly on history undo events #434

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

hannojg
Copy link
Contributor

@hannojg hannojg commented Jul 16, 2024

Details

In this PR I added ranges to the onChange event:

However there was a bug where when undoing using ctrl + z the start and before values where incorrect.

Additionally in this PR I did a cleanup and moved the code that calculates the replacement metrics to a function in the parseUtils.

Note: this PR contains changes from:

So we should merge that one first, or close it and instead just merge this PR.

Related Issues

Expensify/App#37896

Manual Tests

Linked PRs

Expensify/App#44285

@hannojg
Copy link
Contributor Author

hannojg commented Jul 16, 2024

@Skalakid may I ask you (or someone from your team) to review? thank you so much

Skalakid
Skalakid previously approved these changes Jul 17, 2024
Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, left 2 small comments

src/MarkdownTextInput.web.tsx Show resolved Hide resolved
src/web/parserUtils.ts Outdated Show resolved Hide resolved
Skalakid
Skalakid previously approved these changes Jul 17, 2024
@Skalakid
Copy link
Collaborator

@hannojg some check are failing, please fix TS and ESlint errors

@hannojg
Copy link
Contributor Author

hannojg commented Jul 17, 2024

Do you know if there is any bump PR in expensify already?

@Skalakid
Copy link
Collaborator

@hannojg Here is a one that contains a bump to 1.0.105

Skalakid
Skalakid previously approved these changes Jul 17, 2024
@Skalakid
Copy link
Collaborator

Skalakid commented Jul 17, 2024

@hannojg Somehow not all of your commits are signed, can you rebase and sign them, please?

hannojg and others added 7 commits July 17, 2024 10:28
Signed-off-by: Hanno J. Gödecke <die.drei99@yahoo.de>
Signed-off-by: Hanno J. Gödecke <die.drei99@yahoo.de>
Signed-off-by: Hanno J. Gödecke <die.drei99@yahoo.de>
Signed-off-by: Hanno J. Gödecke <die.drei99@yahoo.de>
@hannojg hannojg force-pushed the fix/web-onchange-history-evenst branch from 29ca4c7 to 894790d Compare July 17, 2024 08:29
@hannojg hannojg dismissed Skalakid’s stale review July 17, 2024 08:30

The merge-base changed after approval.

@hannojg hannojg requested a review from Skalakid July 17, 2024 08:31
@hannojg
Copy link
Contributor Author

hannojg commented Jul 17, 2024

Lets wait with merging one second - testing the changes in my expensify PR right now, there might be one problem left!

@hannojg hannojg marked this pull request as draft July 17, 2024 08:40
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