Page MenuHomePhabricator

[web] Move `MessageActionButtons`-related styles inside component
ClosedPublic

Authored by atul on Mar 23 2022, 2:02 PM.
Tags
None
Referenced Files
F3393061: D3510.diff
Sat, Nov 30, 11:16 AM
Unknown Object (File)
Wed, Nov 27, 4:48 PM
Unknown Object (File)
Wed, Nov 27, 4:28 PM
Unknown Object (File)
Fri, Nov 15, 9:02 AM
Unknown Object (File)
Fri, Nov 15, 9:02 AM
Unknown Object (File)
Fri, Nov 15, 6:07 AM
Unknown Object (File)
Thu, Nov 14, 4:34 PM
Unknown Object (File)
Thu, Nov 14, 4:34 PM

Details

Summary

I mistakenly put some of the styles for the MessageActionButtons (reply, create sidebar, etc) in the ComposedMessage stylesheet instead of in the MessageActionButtons stylesheet. This meant that the MessageActionButtons component was appearing incorrectly for RobotextMessages.

This diff puts the MessageActionButtons-related styling at the right layer of abstraction and fixes how things look for robotext messages.

Before:

After:

Test Plan
  1. Hover over a ComposedMessage and ensure that the MessageActionButtons component tooltip appears as it did before/as it does in Figma.
  2. Hover over a RobotextMessage and ensure that the MessageActionButtons component appears as it does for ComposedMessages

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

web/chat/chat-message-list.css
114–117 ↗(On Diff #10637)

We don't need this anymore. Can just include padding: 10px 6px 6px in the existing div.messageActionButtons svg selector in message-action-buttons.css.

(The color property here is actually wrong. It should be color: var(--color-disabled) for the non-hover state.)

118–120 ↗(On Diff #10637)

We don't need this anymore. Can just include cursor: pointer in the existing div.messageActionButtons svg:hover selector in message-action-buttons.css.

web/chat/composed-message.react.js
154 ↗(On Diff #10637)

We push this styling "down" to the actual MessageActionButtons component.

atul published this revision for review.Mar 23 2022, 2:10 PM

Would be good to track this on Linear somewhere... otherwise I wouldn't know not to run a deploy if I hadn't read through this diff

This revision is now accepted and ready to land.Mar 24 2022, 6:09 PM

Would be good to track this on Linear somewhere... otherwise I wouldn't know not to run a deploy if I hadn't read through this diff

noted for future