Skip to content

Comments

feat(achievement): add Recent Unlocks component#4589

Merged
wescopeland merged 2 commits intoRetroAchievements:masterfrom
wescopeland:ach2-recent-unlocks
Feb 23, 2026
Merged

feat(achievement): add Recent Unlocks component#4589
wescopeland merged 2 commits intoRetroAchievements:masterfrom
wescopeland:ach2-recent-unlocks

Conversation

@wescopeland
Copy link
Member

This PR populates the "Recent Unlocks" tab in achievement2. The implementation is fairly straightforward and almost identical to the existing PHP UI with a few subtle changes:

  • If it's a very recent unlock (within the day), a DiffTimestamp is shown.
  • For performance, the rows themselves are deferred to a client-side fetch rather than being eagerly put into server-side props.

http://localhost:64000/achievement2/9?tab=unlocks

Screenshot 2026-02-22 at 4 30 06 PM Screenshot 2026-02-22 at 4 30 18 PM

@wescopeland wescopeland requested a review from a team February 22, 2026 21:32
const { t } = useTranslation();
const { formatDate } = useFormatDate();

const placeholderRowCount = Math.min(achievement.unlocksTotal ?? 0, 50);
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it would make sense to restrict this to a smaller number (maybe 10?). I'm not sure how players would use this information other than to ask a recent earner how they did it.

Conversely, it would be nice to have a "more..." link.

Copy link
Member Author

Choose a reason for hiding this comment

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

I had a similar thought - I kept it at 50 because I wasn't sure if there was some downstream consumer of this data (ie: events) that we're not aware of.

Some sort of more link does make sense (or maybe pagination of the existing list). I'll add this to my notes.

@wescopeland wescopeland merged commit 3458bee into RetroAchievements:master Feb 23, 2026
20 checks passed
@wescopeland wescopeland deleted the ach2-recent-unlocks branch February 23, 2026 23:35
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