Skip to content

feat: Add timeStamps in attached text#875

Closed
thepiyush-303 wants to merge 14 commits intoRocketChat:developfrom
thepiyush-303:feat/addTimeStamp
Closed

feat: Add timeStamps in attached text#875
thepiyush-303 wants to merge 14 commits intoRocketChat:developfrom
thepiyush-303:feat/addTimeStamp

Conversation

@thepiyush-303
Copy link
Contributor

@thepiyush-303 thepiyush-303 commented Jan 12, 2025

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

  • Reverse the order of showing message before attachment, since RC follow attachment before message so that I reverse the order
  • Include timeStams in both simple and nested-attachment

Fixes #873

Video/Screenshots

Screencast.from.2025-02-06.21-39-15.mp4

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.

@Spiral-Memory
Copy link
Collaborator

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.

@thepiyush-303
Copy link
Contributor Author

thepiyush-303 commented Jan 27, 2025

@Spiral-Memory
Done.
image

any other changes?

@thepiyush-303 thepiyush-303 marked this pull request as draft February 5, 2025 16:28
@thepiyush-303
Copy link
Contributor Author

thepiyush-303 commented Feb 6, 2025

(same video as above)

Screencast.from.2025-02-06.21-39-15.mp4

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.

@thepiyush-303 thepiyush-303 marked this pull request as ready for review February 6, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a timeStamp in attachments.

2 participants