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, Dec 1, 7:30 PM
Unknown Object (File)
Thu, Nov 28, 10:13 PM
Unknown Object (File)
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)
Nov 22 2024, 7:10 AM
Unknown Object (File)
Nov 11 2024, 1:52 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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

jacek held this revision as a draft.
web/chat/composed-message.react.js
132

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

web/chat/robotext-message.react.js
27

Will be removed in next diffs

69

Will be changed in next diffs

tomek added inline comments.
web/chat/message-tooltip.css
6

Please use variables in any new code

web/chat/message-tooltip.react.js
16–19

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

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

web/chat/message-tooltip.react.js
11

Yes, it doesn't have to be optional

Used JS constants in styles to support correct measuring size