Page MenuHomePhabricator

[web] Refactor `MessageTooltip` component
ClosedPublic

Authored by jacek on Aug 23 2022, 4:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:08 PM
Unknown Object (File)
Sun, Apr 28, 11:06 PM
Unknown Object (File)
Sun, Apr 28, 10:39 PM
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