feat: Add timeStamps in attached text
Brief Title
Now text attachments also include timeStamps beside username just like RC
I have added timestamp in the following way:
if message is from previous month then show date in 'january 28,2025' format.
if message is from previous week but same month then show the date '01/02/2025' format
if message is from same week then show 'day, time'
is message is from same day then show 'time'.
It is inspired by the approach that RC follows, i implement it and found some responsive issues so i also fixed them, check final changes is video.
Acceptance Criteria fulfillment
- [x] Reverse the order of showing message before attachment, since RC follow attachment before message so that I reverse the order
- [x] Include timeStams in both simple and nested-attachment
Fixes #873
Video/Screenshots
https://github.com/user-attachments/assets/883434c8-60b2-4909-bee9-20076f60ec75
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-875 after approval. Contributors are requested to replace <pr_number> with the actual PR number.
In EC, the choice between username or name is customizable: You will have to make it dynamic :
Remove @ sign from attachment because RC also doesn't include it.
@Spiral-Memory
Done.
any other changes?
(same video as above)
https://github.com/user-attachments/assets/883434c8-60b2-4909-bee9-20076f60ec75
Hey @Spiral-Memory, I have added timestamp in the following way:
- if message is from previous month then show date in 'january 28,2025' format.
- if message is from previous week but same month then show the date '01/02/2025' format
- if message is from same week then show 'day, time'
- is message is from same day then show 'time'.
It is inspired by the approach that RC follows, i implement it and found some responsive issues so i also fixed them, check final changes is video.