In D10497#303263, @ginsu wrote:
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Dec 29 2023
Dec 29 2023
Just a question - do you plan to add the Roles community action here later as well?
rohan committed rCOMMe1798c21a902: [lib/web/native] Show viewer in @-mentioning tooltip (authored by rohan).
[lib/web/native] Show viewer in @-mentioning tooltip
Actually, I don't think we need this. I did some testing without this change and I'm not getting notifications for any self-mentions (I was logged into 'ashoat' on native)
rohan updated the diff for D10119: [web] Update existing checks on isDefault in role-actions-menu.reactjs.
Rebase
rohan committed rCOMM610946adb4c4: [lib] Include the rawChatName when constructing the chat mention search index (authored by rohan).
[lib] Include the rawChatName when constructing the chat mention search index
rohan committed rCOMM9e834fe59da5: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName (authored by rohan).
[lib/web/native] Update ChatMentionCandidates type to include a rawChatName
rohan committed rCOMMf0db11d1b4e7: [lib] Pass in threadInfos into getChatMentionCandidates (authored by rohan).
[lib] Pass in threadInfos into getChatMentionCandidates
rohan committed rCOMM87b294ac9410: [lib] Rename threadInfos to resolvedThreadInfos in getChatMentionCandidates (authored by rohan).
[lib] Rename threadInfos to resolvedThreadInfos in getChatMentionCandidates
Dec 28 2023
Dec 28 2023
rohan added inline comments to D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
rohan updated the diff for D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
Address feedback on removing unnecessary changes
rohan added a comment to D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
In D10460#302669, @inka wrote:I understand the changes to getChatMentionCandidates / useChatMentionCandidatesObjAndUtils, because in the next diff you change useChatMentionSearchIndex, which is being passed data from useChatMentionCandidatesObjAndUtils. But what are the other changes for?
rohan updated the diff for D10461: [lib] Include the rawChatName when constructing the chat mention search index.
Rebase
rohan updated the diff for D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
Address feedback (will respond to comments separately). Mainly factored out individual types and updated the code to reflect that
Dec 27 2023
Dec 27 2023
rohan committed rCOMM038aad4a2924: [lib] Make useAncestorThreads more efficient (authored by rohan).
[lib] Make useAncestorThreads more efficient
rohan committed rCOMMa37fd35408a6: [lib] Fix typo in useMentionTypeaheadUserSuggestions (authored by rohan).
[lib] Fix typo in useMentionTypeaheadUserSuggestions
Dec 26 2023
Dec 26 2023
rohan added a comment to D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
In D10460#302348, @ashoat wrote:Just wondering, are we supporting something like "@userone.eth and 0x12312321" matching a chat whose ENS-resolved name is "userone.eth and usertwo.eth"?
rohan requested review of D10460: [lib/web/native] Update ChatMentionCandidates type to include a rawChatName.
rohan requested review of D10458: [lib] Rename threadInfos to resolvedThreadInfos in getChatMentionCandidates.
Dec 23 2023
Dec 23 2023
In D10419#302273, @ashoat wrote:Is there some missing context here? It sounds like @rohan did some testing and things didn't work, but not sure what that testing was
Dec 22 2023
Dec 22 2023
Just requesting changes so its back in your queue. Let me know if my testing was missing something
rohan committed rCOMM165d35ab1a3f: [lib/web/native] Convert getMentionTypeaheadUserSuggestions into a hook (authored by rohan).
[lib/web/native] Convert getMentionTypeaheadUserSuggestions into a hook
rohan committed rCOMMaf4437e04876: [keyserver] Update sendPushNotif to detect mention for a ENS name (authored by rohan).
[keyserver] Update sendPushNotif to detect mention for a ENS name
rohan committed rCOMMc97013f91e24: [lib] Modify markdownUserMentionRegex to match ENS names as well (authored by rohan).
[lib] Modify markdownUserMentionRegex to match ENS names as well
rohan committed rCOMM87417b194198: [lib/web/native] Bold ENS names in user mentions (authored by rohan).
[lib/web/native] Bold ENS names in user mentions
rohan committed rCOMM7b51ac43d61c: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip (authored by rohan).
[lib/web/native] Show and search resolved ENS names in @ mentioning toolip
rohan committed rCOMMe87f9df936e2: [native] Compute typeahead suggestions and matched strings outside the class… (authored by rohan).
[native] Compute typeahead suggestions and matched strings outside the class…
rohan committed rCOMM5361aca8bd01: [native] Lift selectionState in chat input bar (authored by rohan).
[native] Lift selectionState in chat input bar
Dec 21 2023
Dec 21 2023
rohan requested review of D10432: [lib/web/native] Convert getMentionTypeaheadUserSuggestions into a hook.
rohan added inline comments to D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
rohan updated the diff for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
Address feedback
rohan updated the diff for D10388: [lib] Modify markdownUserMentionRegex to match ENS names as well.
Move constant to account-utils.js with a comment
Revert the most recent update (updated the wrong diff)
Move constant to account-utils.js with a comment
In D10388#301357, @inka wrote:Looking at usages of oldValidUsernameRegexString I can see that it is used in oldValidUsernameRegex, which is used for something mention related on the keyserver. Should that be changed?
In D10389#301405, @inka wrote:getDefaultTextMessageRules is exactly the same on native and web, can we move it to lib?
Filter members without a role first, and construct a resolvedMembersMap and key by member.id
rohan updated the diff for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
Remove console.log from testing
rohan updated the diff for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
- Rewrite typeaheadMatchedStrings on both web and native to avoid ternary
- Prevent search index from recalculating search results for each usersInThread
rohan added inline comments to D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
Dec 20 2023
Dec 20 2023
rohan committed rCOMMf6eaff7c3230: [lib] Memoize userinfos in usePotentialMemberItems (authored by rohan).
[lib] Memoize userinfos in usePotentialMemberItems
Dec 19 2023
Dec 19 2023
I'll leave this to the other reviewers as it seems like they have some more context/feedback here
rohan updated the diff for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
getUserMentionsCandidates --> useUserMentionsCandidates
rohan added a comment to D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
In D10387#301064, @ashoat wrote:Memoization isn't just about avoiding the performance cost of rerunning the code. What's usually more important is avoiding regenerating non-primitives (like arrays and objects). By avoiding regenerating these, we reduce a bunch of expensive React renders.
rohan updated the diff for D10407: [keyserver] Update sendPushNotif to detect mention for a ENS name.
Define userInfosWithENSNames in the correct scope
rohan added inline comments to D10407: [keyserver] Update sendPushNotif to detect mention for a ENS name.
rohan requested review of D10407: [keyserver] Update sendPushNotif to detect mention for a ENS name.
rohan added a comment to D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
In D10387#300593, @ashoat wrote:You fixed it for web but not native (I actually didn't catch web – glad you did)
Oh sorry about that, I don't know what I was thinking to not do it for both even though it was called out here.
Separately, wonder if we just want to have a hook like useThreadChatMentionCandidates instead of memoizing the results of getUserMentionsCandidates in both places
Yeah that works better - though I was taking another look at getUserMentionsCandidates and I'm not sure if there's a use for memoization here. I don't think this is computationally expensive, but feel free to let me know if you disagree!
function getUserMentionsCandidates( threadInfo: ThreadInfo, parentThreadInfo: ?ThreadInfo, ): $ReadOnlyArray<RelativeMemberInfo> { if (threadInfo.type !== threadTypes.SIDEBAR) { return threadInfo.members; } if (parentThreadInfo) { return parentThreadInfo.members; } // This scenario should not occur unless the user logs out while looking at a // sidebar. In that scenario, the Redux store may be cleared before ReactNav // finishes transitioning away from the previous screen return []; }
- Memoize hook return collection
- Remove members param from both web and native in rules.react.js
rohan updated the diff for D10386: [native] Compute typeahead suggestions and matched strings outside the class component.
Rebase
Use SetState type
Dec 18 2023
Dec 18 2023
rohan updated the diff for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
Memoize userMentionsCandidates
rohan added inline comments to D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
rohan updated the test plan for D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
rohan requested review of D10387: [lib/web/native] Show and search resolved ENS names in @ mentioning toolip.
Dec 15 2023
Dec 15 2023
rohan committed rCOMM63fe093f1cab: [lib] Deprecate userSearchIndexForPotentialMembers and userStoreSearchIndex (authored by rohan).
[lib] Deprecate userSearchIndexForPotentialMembers and userStoreSearchIndex
rohan committed rCOMM275fee613bc1: [web] Update AddUsersList to call useUserSearchIndex (authored by rohan).
[web] Update AddUsersList to call useUserSearchIndex
rohan committed rCOMM76e4ca6af009: [native] Update RelationshipList to call useUserSearchIndex (authored by rohan).
[native] Update RelationshipList to call useUserSearchIndex