Story listings: expose reading time and a public shortest-read order

Open
#728 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
laravel, php, postgresql
Domain
api, backend

Research direction

Start from ArticleView, where readingMinutes is already computed, and find the ListingItem representation the public listing returns. Reuse the same estimate there, and check how the listing query paginates so a shortest-read order can be applied in the database rather than per page. Done when listing items include reading time and a sort parameter returns the full paginated set in reading-time order, with tests covering both.

Written by the indexing model from the issue text.

Description

area/site area/themes type/enhancement when/later

ArticleView includes readingMinutes, but ListingItem does not expose that value. A theme building a home feed, section archive, author archive or related story card therefore cannot show reading time consistently. The public listing also does not offer a shortest-read sort that applies to the full paginated set.

Expose the same reading-time estimate on public listing items and consider a supported sort that preserves the chosen order across pagination. The theme should not need to fetch each article body or sort just the current page.

Dominant language
PHP
Stars
1
Forks
1
Avg merge
1h 40m
Merged PRs (30d)
143

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from temecms/teme

All issues in temecms/teme

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.