Page MenuHomePhabricator

[native] Added edit button to the Tooltip
ClosedPublic

Authored by kuba on Apr 7 2023, 6:55 AM.
Tags
None
Referenced Files
F3528558: D7343.diff
Tue, Dec 24, 9:39 AM
Unknown Object (File)
Wed, Dec 11, 12:06 AM
Unknown Object (File)
Sat, Dec 7, 8:37 PM
Unknown Object (File)
Sat, Dec 7, 8:37 PM
Unknown Object (File)
Sat, Dec 7, 8:37 PM
Unknown Object (File)
Fri, Nov 29, 2:11 AM
Unknown Object (File)
Nov 15 2024, 12:02 AM
Unknown Object (File)
Nov 9 2024, 11:45 PM
Subscribers

Details

Summary

Added Edit button to the tooltip, which selects a message for editing. It is shown only for messages in which the author is the viewer. The edit button is hidden behind the EDIT_BUTTON_DISPLAY feature flag.

Test Plan

Checked if the edit button displays correctly in the tooltip.
Checked if the buttons are correctly handled and if there are many of them.
Checked if the state is correctly changed in dev tools.
Checked if the button is only shown for users from staff.js.

Screenshot 2023-04-07 at 16.02.41.png (472×732 px, 96 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kuba edited the test plan for this revision. (Show Details)
native/chat/text-message-tooltip-modal.react.js
57–58

can't this be const { messageInfo } = route.params.item;? I don't think you use item anywhere afterwards

60–66

Shouldn't this be inside React.useCallback?

kuba marked 2 inline comments as done.
kuba edited the test plan for this revision. (Show Details)

Added useCallback, and addressed other comments

This revision is now accepted and ready to land.Apr 12 2023, 3:41 AM