Page MenuHomePhabricator

[native] Added edit button to the Tooltip
ClosedPublic

Authored by kuba on Apr 7 2023, 6:55 AM.
Tags
None
Referenced Files
F3183863: D7343.id24962.diff
Fri, Nov 8, 10:00 AM
F3183859: D7343.id24783.diff
Fri, Nov 8, 10:00 AM
F3183856: D7343.id.diff
Fri, Nov 8, 10:00 AM
Unknown Object (File)
Tue, Nov 5, 2:36 AM
Unknown Object (File)
Tue, Nov 5, 2:36 AM
Unknown Object (File)
Tue, Nov 5, 2:35 AM
Unknown Object (File)
Tue, Nov 5, 2:35 AM
Unknown Object (File)
Mon, Nov 4, 12:56 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 ↗(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