Page MenuHomePhabricator

[lib] Fix subchannels of subchannels in GENESIS not appearing in navigation side drawer
ClosedPublic

Authored by ashoat on Jul 10 2024, 9:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 17, 4:40 AM
Unknown Object (File)
Tue, Oct 15, 4:16 PM
Unknown Object (File)
Tue, Oct 15, 4:16 PM
Unknown Object (File)
Tue, Oct 15, 4:15 PM
Unknown Object (File)
Sep 25 2024, 8:25 PM
Unknown Object (File)
Sep 25 2024, 8:25 PM
Unknown Object (File)
Sep 20 2024, 8:01 AM
Unknown Object (File)
Sep 16 2024, 2:05 AM
Subscribers
None

Details

Summary

This occurred because I misused the ChatMentionContext. We should use getCommunityThreadIDForGenesisThreads instead of getCommunity, so that channels of GENESIS are treated the same as community roots.

This addresses ENG-8808.

Test Plan

I reproduced the issue locally and confirmed that this diff resolves it

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/components/chat-mention-provider.react.js
35 ↗(On Diff #42209)

I changed the type here so we could pass RawThreadInfo in

lib/hooks/thread-hooks.js
23–24 ↗(On Diff #42209)

This is the actual change

The name getCommunityThreadIDForGenesisThreads seems to suggest that this function only returns values for GENESIS subchannels. Can you confirm this doesn't break for chats in other communities?

This revision is now accepted and ready to land.Jul 11 2024, 2:58 AM

Great catch @inka. You're totally right... this did break non-GENESIS communities.

The right way to handle this is modelled here in the codebase

Model after useThreadChatMentionCandidates