Skip to content

Conversation

@devlopharsh
Copy link

@devlopharsh devlopharsh commented Jan 22, 2026

this PR fixed #3578

Related Tickets & Documents

Fixes: #3578

Description

issue - When browsing the blog, there’s currently no indication of how long a post might take to read. This makes it harder for readers to decide which article to open, especially when they are short on time.

solution - Introduce a consistent reading-time estimate for blog posts by calculating it from the full post content (with HTML stripped), and display this estimate prominently on each post card to improve content discoverability and user experience.

Changes

  • Implemented a robust reading-time utility that safely strips HTML and entities before counting words, handling empty content gracefully.
  • Computed reading time at approximately 250 words per minute and rendered it as a top-right “X min read” pill on every PostCard.
  • Updated all post list and mapping components to pass the complete post content into PostCard, ensuring accurate estimates.
  • Extended API list queries and shared fragments to include content, and removed redundant content fetching from single-post queries to avoid duplication.

Type of Change

  • Chore (maintenance, refactoring, tooling updates)
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (change that adds functionality)
  • Breaking Change (may require updates in existing code)
  • UI improvement (visual or design changes)
  • Performance improvement (optimization or efficiency enhancements)
  • Documentation update (changes to README, guides, etc.)
  • CI (updates to continuous integration workflows)
  • Revert (undo a previous commit or merge)

Testing

N/A no specific test needed .

Demo

Before :

Screenshot 2026-01-22 225326

After :

Screenshot 2026-01-22 222535

Environment and Dependencies

  • New Dependencies: N/A .
  • Configuration Changes: N/A.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added corresponding tests
  • I have run the build command to ensure there are no build errors
  • My changes have been tested across relevant browsers/devices
  • For UI changes, I've included visual evidence of my changes

…rd#3578

Signed-off-by: developharsh <harsh237hk@gmail.com>
@devlopharsh
Copy link
Author

hii @amaan-bhati @Achanandhi-M @gouravkrosx , please view this PR and acknowledge me accordingly , it will hardly take less than a minute please . Thank you !!

@amaan-bhati amaan-bhati self-requested a review January 29, 2026 18:12
Copy link
Member

@amaan-bhati amaan-bhati left a comment

Choose a reason for hiding this comment

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

Hey @devlopharsh Thanks for raising this pr and trying to add attention to detail in the blog posts. The idea to display the reading time is nice, but i think its placement can be improved. We can add the reading time right next to the name and the date posted, this would keep the information hierarchy entact, information kept at one single palce is a good practice we should try to focus on here. Hence, lets try to add the reading time right next to the author name and the date posted in the blog card.

@devlopharsh
Copy link
Author

@amaan-bhati
Sure sir , I totally understand your concern regarding the design hierarchy of the card and will update the change soon . Please acknowledge me if any other detail is nead to be changed , thank you for the acknowledgement !!

@devlopharsh
Copy link
Author

@amaan-bhati, I have shifted the time in the line of details as displayed in the Image. Hope that this is the one you are asking for !!
Please review the change once and let me know if any enhacement needed in the PR , Thank you : )

Screenshot 2026-01-30 003846

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.

[feature]: Show estimated reading time on blog posts

2 participants