Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance comment time formatting with localized time ago display #21329

Merged

Conversation

suhaib-mousa
Copy link
Contributor

This PR addresses issue #11225, enhancing the comment timestamp display by introducing a concise time ago format with the ability to toggle to a more readable timestamp upon user interaction.

Changes Include:

  • Short Time Ago Format: Displays timestamps as short formats such as 3m (3 minutes ago), 5h (5 hours ago), 2d (2 days ago), and 1w (1 week ago) for a cleaner UI.
  • Clickable Timestamps: Users can click on the short timestamp to view the full, readable format like "3 minutes ago," "5 hours ago," "2 days ago," and "1 week ago."

Screen Recording 2024-11-13 130426

- Implemented dynamic time ago formatting for comment timestamps
- Added localization support for both English and Arabic
@suhaib-mousa
Copy link
Contributor Author

Better late than never! 😂@berkansasmaz

@berkansasmaz berkansasmaz requested a review from enisn November 15, 2024 06:24
@enisn
Copy link
Member

enisn commented Nov 15, 2024

Thanks for your contribution. It seems very nice, I'll check when I start working on the next milestone 👍

@suhaib-mousa
Copy link
Contributor Author

Hello @enisn, I’ve just resolved the merge conflicts, but I’m concerned that more conflicts might arise if the review gets delayed. 😅

@suhaib-mousa
Copy link
Contributor Author

Hi @enisn @berkansasmaz, just following up on this PR. I believe it's simple and a great improvement for the UX.

@enisn
Copy link
Member

enisn commented Jan 13, 2025

I think we use luxon or something similar to represent relative dates. Probably there is no dependency on CMSKit to it. I'll check once more and if it's possible, using it might be better

Copy link
Member

@enisn enisn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, I'll merge it since CMS Kit doesn't have a direct dependency on luxon. We may update it later but it seems ok for now 👍

@enisn enisn changed the base branch from dev to rel-9.1 January 21, 2025 05:34
@enisn enisn merged commit 4284e0b into abpframework:rel-9.1 Jan 21, 2025
2 checks passed
@suhaib-mousa suhaib-mousa deleted the features/cms-kit-creation-time branch January 21, 2025 06:01
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.

2 participants