Page MenuHomePhabricator

[native] Added displaying labels to InlineEngagement
ClosedPublic

Authored by kuba on Mar 14 2023, 1:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 1:04 PM
Unknown Object (File)
Fri, Dec 6, 6:10 AM
Unknown Object (File)
Fri, Dec 6, 6:10 AM
Unknown Object (File)
Fri, Dec 6, 6:10 AM
Unknown Object (File)
Thu, Dec 5, 7:21 AM
Unknown Object (File)
Thu, Dec 5, 7:21 AM
Unknown Object (File)
Thu, Dec 5, 7:21 AM
Unknown Object (File)
Thu, Dec 5, 7:21 AM
Subscribers

Details

Summary

Added possibility to label the messages to display ‘Edited' label in next diffs.

Test Plan
  • Run the app.
  • Added the label to every message.
  • Checked if the labels are displayed correctly both with text messages and with images.
  • Checked if Reactions/Threads are also correctly positioned next to the label.
  • Checked if labels in a few messages in a row do not take too much space.
  • Checked displaying on both the left and right side of the chat.
  • Checked displaying on both iOS and Android.
  • Checked displaying on both dark and light mode.

Screenshots (iOS / Android):

  • Light mode:

Screenshot 2023-03-14 at 09.33.12.png (948×1 px, 523 KB)

  • Dark mode:

Screenshot 2023-03-14 at 09.35.55.png (680×1 px, 302 KB)

  • Few messages in a row:

Screenshot 2023-03-14 at 09.50.23.png (664×1 px, 261 KB)

  • Image:

Screenshot 2023-03-14 at 09.35.26.png (856×1 px, 402 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kuba edited the test plan for this revision. (Show Details)

Addressed @ginsu feedback from the web version of diff

Added unique keys to the rendered components

Will this affect the height of the item? Have you made the necessary changes to the height determination code (textMessageItemHeight)?

ashoat requested changes to this revision.Mar 24 2023, 11:55 AM

Will this affect the height of the item? Have you made the necessary changes to the height determination code (textMessageItemHeight)?

Requesting changes for my question above

This revision now requires changes to proceed.Mar 24 2023, 11:55 AM

Will this affect the height of the item? Have you made the necessary changes to the height determination code (textMessageItemHeight)?

Requesting changes for my question above

Done in https://phab.comm.dev/D7066, because that is where it was used for the first time.

ashoat requested changes to this revision.Mar 28 2023, 5:41 AM

Just nits, but requesting changes because some of them are non-obvious and I want to confirm it's implemented right before you land :)

native/chat/inline-engagement.react.js
130–132 ↗(On Diff #24071)

We can move this below the !label check to avoid unnecessary computation

142 ↗(On Diff #24071)

Use "De Morgan's law"

172 ↗(On Diff #24071)

Please always avoid inline logic from within JSX. JSX should be a "leaf node" in the AST

This revision now requires changes to proceed.Mar 28 2023, 5:41 AM
kuba marked 3 inline comments as done.

Responded to review

This revision is now accepted and ready to land.Mar 28 2023, 11:24 AM

Created new color in theme for messageLabel

Add explicitly fontSize for label to prevent messageHeight error