Skip to content

Chore: Migrate Touch to hooks#4422

Merged
dnlsilva merged 10 commits into
developfrom
touch-hooks
Aug 17, 2022
Merged

Chore: Migrate Touch to hooks#4422
dnlsilva merged 10 commits into
developfrom
touch-hooks

Conversation

@dnlsilva

@dnlsilva dnlsilva commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

Proposed changes

Migrate Touch to hooks

Issue(s)

How to test or reproduce

To validate this change is basically to test some action sheet that has a button.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Comment on lines +95 to +96
// this is not the correct, but but we have a lot of "buttons" and a don't know what the font of truth
onPress={onReaction as () => void}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think it's a matter of source of truth.
RectButton uses

onPress?: (pointerInside: boolean) => void;

while you're sending

({ emoji }: { emoji: TItem }) => void

Since Touch is a generic component, I'd override the type with Function.

Also we need to reevaluate this, since it's taken from a lib we're not using anymore.

@dnlsilva dnlsilva merged commit 585e5a0 into develop Aug 17, 2022
@dnlsilva dnlsilva deleted the touch-hooks branch August 17, 2022 13:32
diegolmello pushed a commit that referenced this pull request Sep 12, 2022
* migrate to hooks and fix types

* fix import and remove theme prop

* update tests

* fix touch file name

* wip

* rename

* change to touch

* remove button and change to touch
ivnxyz pushed a commit to NextiaDev/Rocket.Chat.ReactNative that referenced this pull request May 26, 2023
* migrate to hooks and fix types

* fix import and remove theme prop

* update tests

* fix touch file name

* wip

* rename

* change to touch

* remove button and change to touch
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.

3 participants