Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[NEW] Attachment Files Redesign

Open hugocostadev opened this issue 3 years ago • 2 comments

Proposed changes (including videos or screenshots)

  • Replace File attachments to use MessageGenericPreview
  • Move File attachments to the /MessageList folder
  • Refactor Video, Image, and Audio Attachments to use MessageGenericPreview
  • New component MessageCollapsible
  • Refactored the OEmbedCollpsible component to use MessageCollapsible
  • Refactored the AttachmentSize component to include different style
  • Added descriptionMd property to the MessageAttachment object to use the new parser in descriptions
  • Added size and format to attachment object at sendFileMessage.ts
  • Changed maxWidth and maxHeight of AttachmentContext to be the same as the OEmbed sizes

OLD: image

NEW: image

Issue(s)

Steps to test or reproduce

Further comments

This PR implements the File Attachment using the MessageGenericPreview. To be able to test during the Draft/PR phase, it's necessary to run both PR together.

Fuselage Pull Request: https://github.com/RocketChat/fuselage/pull/932/

TC-57

hugocostadev avatar Dec 06 '22 17:12 hugocostadev

This pull request introduces 1 alert when merging 64d41eb0352a514c7120a9b362e8dd75c9ca6221 into c8af645404418f2593d1ce95fa93123f9719c03a - view on LGTM.com

new alerts:

  • 1 for Useless conditional

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine :gear: that powers LGTM.com. For more information, please check out our post on the GitHub blog.

lgtm-com[bot] avatar Dec 06 '22 18:12 lgtm-com[bot]

We should discuss better if descriptionMd is something we want to do...

gabriellsh avatar Dec 20 '22 20:12 gabriellsh

Codecov Report

Merging #27470 (b56ac3e) into develop (1fecf0f) will increase coverage by 0.90%. The diff coverage is 22.22%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27470      +/-   ##
===========================================
+ Coverage    42.01%   42.92%   +0.90%     
===========================================
  Files          844      818      -26     
  Lines        17751    17243     -508     
  Branches      2009     1939      -70     
===========================================
- Hits          7458     7401      -57     
+ Misses       10029     9580     -449     
+ Partials       264      262       -2     
Flag Coverage Δ
e2e 42.92% <22.22%> (+0.90%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Dec 29 '22 14:12 codecov[bot]