Page MenuHomePhabricator

[native] Added edit button to the Tooltip
ClosedPublic

Authored by kuba on Apr 7 2023, 6:55 AM.
Tags
None
Referenced Files
F2114465: D7343.id.diff
Wed, Jun 26, 5:46 AM
F2110439: D7343.id24962.diff
Tue, Jun 25, 7:53 PM
Unknown Object (File)
Sun, Jun 16, 3:39 AM
Unknown Object (File)
May 26 2024, 10:03 AM
Unknown Object (File)
May 26 2024, 1:12 AM
Unknown Object (File)
May 25 2024, 5:30 PM
Unknown Object (File)
May 25 2024, 5:30 PM
Unknown Object (File)
May 25 2024, 5:30 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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

60–66 ↗(On Diff #24783)

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