feat: Add scroll-aware remaining read time indicator to blog post pages#1670
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
|
@copilot there is 0 file changed |
The PR shows 3 files changed (176 additions, 2 deletions) on the "Files changed" tab:
This might have been a temporary GitHub UI caching issue. Could you try refreshing the "Files changed" tab? The changes are confirmed present on the branch (commit |
Adds a fixed bottom-right reading time badge to blog post pages that appears at 15% scroll depth, counts down remaining read time as the user scrolls, and disappears once the author card enters the viewport.
Description
Blog post pages lacked any reading progress feedback. This adds a non-intrusive "N mins remaining" pill that tracks scroll position relative to article content.
Type of Change
Changes Made
src/components/ReadingTimeIndicator/index.tsx— new componentceil(totalReadTime × (1 − readProgress))wherereadProgressisscrollY / authorCardAbsoluteToprequestAnimationFrameto avoid layout thrashrole="status",aria-live="polite", descriptivearia-labelsrc/components/ReadingTimeIndicator/styles.module.css— new stylesposition: fixed; bottom: 24px; right: 24pxteal pill with dark-mode variant and mobile sizingsrc/theme/BlogPostItem/Footer/index.tsx— wired upuseRefattached to the author card<section>as the content-end sentinel<ReadingTimeIndicator totalReadTime={roundedReadTime} authorCardRef={authorCardRef} />rendered for allisBlogPostPagerendersDependencies
No new dependencies.
Checklist
npm run buildand attached screenshot(s) in this PR.