HomePhabricator
Diffusion Comm d41f80f39730

[native] introduce MarkdownUserMention component

Description

[native] introduce MarkdownUserMention component

Summary:
The last step here is to render a Text component that has an onPress event that will navigate to a user profile whenever that callback is called. Building this component, I took some inspiration from @patryk's work with the MarkdownChatMention component.

https://github.com/CommE2E/comm/blob/master/native/markdown/markdown-chat-mention.react.js

This is step 4 in the list below
Outlined below are the steps I will take to make @metion of a user into a touchable

  1. Introduce createMemberMapForUserMentions function (Right now we only store a set of usernames but we also will want to know the id of the user based on the username)
  2. Introduce parseUserMentions function (We will use this function to get and return a userID from the membersMap)
  3. Introduce userProfileBottomSheetActive state to the markdown context (This will be used for disabling the press to focus on a message functionality)
  4. Introduce MarkdownUserMention component (this will render the touchable that will navigate to the user profile)

Depends on D9393

Test Plan:
Please see the demo video below

Testing the onLongPress callback:

Reviewers: atul, inka

Reviewed By: atul

Subscribers: patryk, ashoat, tomek, wyilio

Differential Revision: https://phab.comm.dev/D9394

Details

Provenance
ginsuAuthored on Oct 6 2023, 2:34 AM
Reviewer
atul
Differential Revision
D9394: [native] introduce MarkdownUserMention component
Parents
rCOMMa2003594b58f: [native] introduce userProfileBottomSheetActive state to markdown context
Branches
Unknown
Tags
Unknown