Page MenuHomePhabricator

[web] Refactor `MessageTooltip` component
ClosedPublic

Authored by jacek on Aug 23 2022, 4:52 AM.
Tags
None
Referenced Files
F3384674: D4912.id16189.diff
Thu, Nov 28, 10:13 PM
F3384509: D4912.id16072.diff
Thu, Nov 28, 9:17 PM
Unknown Object (File)
Mon, Nov 25, 11:05 PM
Unknown Object (File)
Mon, Nov 25, 2:09 PM
Unknown Object (File)
Fri, Nov 22, 7:10 AM
Unknown Object (File)
Mon, Nov 11, 1:52 AM
Unknown Object (File)
Oct 28 2024, 5:06 AM
Unknown Object (File)
Oct 28 2024, 5:06 AM
Subscribers

Details

Summary

Major refactor of MessageTooltip that simplifies the component leaving only necessary properties and removing positioning logic out of the component

The new component:

Screenshot_Google Chrome_2022-08-23_143424.png (140×200 px, 10 KB)

Test Plan

Flow; Tested with the rest of diffs stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jacek held this revision as a draft.
web/chat/composed-message.react.js
132 ↗(On Diff #15853)

Will be changed in next diffs - change to avoid flow issue

web/chat/robotext-message.react.js
27 ↗(On Diff #15853)

Will be removed in next diffs

69 ↗(On Diff #15853)

Will be changed in next diffs

tomek added inline comments.
web/chat/message-tooltip.css
6 ↗(On Diff #15853)

Please use variables in any new code

web/chat/message-tooltip.react.js
16–19 ↗(On Diff #15853)

If the classes are always enabled you can use a lot simpler syntax

This revision is now accepted and ready to land.Aug 25 2022, 11:02 AM
abosh added inline comments.
web/chat/message-tooltip.react.js
11 ↗(On Diff #15853)

What's a case when messageTimestamp would be optional? Doesn't every message have a timestamp?

web/chat/message-tooltip.react.js
11 ↗(On Diff #15853)

Yes, it doesn't have to be optional

Used JS constants in styles to support correct measuring size