Page MenuHomePhabricator

[lib][native][web] Introduce useChildThreadInfosMap so drawer code can see ResolvedThreadInfos
ClosedPublic

Authored by ashoat on Jul 8 2024, 8:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 8, 3:03 PM
Unknown Object (File)
Sun, Sep 8, 3:03 PM
Unknown Object (File)
Sun, Sep 8, 3:03 PM
Unknown Object (File)
Sun, Sep 8, 3:02 PM
Unknown Object (File)
Sat, Aug 31, 12:00 AM
Unknown Object (File)
Sun, Aug 18, 8:08 AM
Unknown Object (File)
Aug 9 2024, 8:57 AM
Unknown Object (File)
Aug 9 2024, 8:57 AM
Subscribers
None

Details

Summary

This will be used in the next diff so we can sort the communities and ENS-resolved channels within them alphabetically.

I used chatMentionCandidatesObj from the ChatMentionsContext to avoid ENS-resolving all ThreadInfos twice.

Test Plan

I tested the stack as follows:

  1. I tested both native and web
  2. I tested both normal communities and GENESIS
  3. I tested both uppercase and lowercase names
  4. I made sure the list of channels was the same before and after (only the order changed)
  5. I edited a name on web and made sure its appearance in the order changed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested review of this revision.Jul 8 2024, 9:15 PM
tomek added inline comments.
lib/hooks/thread-hooks.js
16 ↗(On Diff #42139)

It feels wrong to use a mention-specific util in a hook that will be used outside the mentioning context.

This revision is now accepted and ready to land.Jul 9 2024, 5:15 AM
lib/hooks/thread-hooks.js
16 ↗(On Diff #42139)

Yeah, this is weird. Ideally we'd rename useChatMentionContext to have a more general name, but I didn't have time to address that here