Page MenuHomePhabricator

[native] Fix reacting to robotext when sidebar is disabled
ClosedPublic

Authored by ashoat on Oct 14 2024, 11:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 8:39 AM
Unknown Object (File)
Wed, Dec 18, 8:39 AM
Unknown Object (File)
Wed, Dec 18, 8:38 AM
Unknown Object (File)
Wed, Dec 18, 8:36 AM
Unknown Object (File)
Nov 16 2024, 10:47 AM
Unknown Object (File)
Nov 16 2024, 10:47 AM
Unknown Object (File)
Nov 9 2024, 7:50 AM
Unknown Object (File)
Nov 4 2024, 5:31 AM
Subscribers
None

Details

Summary

While working on the parent diffs, I noticed an issue where pressing on a robotext did nothing.

Turns out this is not a recent regression introduced by my changes, and is an issue that has been present since we refactored how the reaction options appear.

The issue is that we had a condition that exited if visibleEntryIDs.length === 0, but our reaction options aren't rendered via visibleEntryIDs.

This diff addresses it by adding && !canCreateReactionFromMessage to the check.

Depends on D13708

Test Plan

Confirm that on native, when I press on a robotext in a sidebar, I'm able to see options to react

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/chat/multimedia-message.react.js
249 ↗(On Diff #45178)

We don't need to use chatMessageItemEngagementTargetMessageInfo here, since we've already narrowed the type of props.item to ChatMultimediaMessageInfoItem

native/chat/text-message.react.js
181–183 ↗(On Diff #45178)

I removed this check because TextMessage.visibleEntryIDs never returns an empty array

This revision is now accepted and ready to land.Oct 15 2024, 1:11 AM