Skip to content

feat: show the local time in profile previews - #1014

Merged
nunomaduro merged 1 commit into
dev-null-sh:productionfrom
Taldres:feat/preview-local-time
Oct 26, 2026
Merged

nunomaduro merged 1 commit into
dev-null-sh:productionfrom
Taldres:feat/preview-local-time

Conversation

@Taldres

@Taldres Taldres commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #803. Profile previews now show the same local time line as the profile, e.g. 8:14 AM (UTC +02:00), under the bio.

It follows the profile's rules: it only shows when the person turned on "Show my local time on my profile" and has a timezone set, and it stays hidden on unavailable previews, like the bio.

  • The preview endpoint already returns timezone and show_local_time, so there is no backend change.
  • The preview reuses LocalTime, which can now render as a p instead of an li and takes a className. The profile looks exactly as before.
  • Like on the profile, the time renders nothing on the server and ticks every minute in the browser.
  • The bio is clamped to three lines, so the line adds at most one row to the preview, about 28px.

Tests

  • A unit test for LocalTime: the time in the given zone with its offset, and a list item by default.
  • A feature test that the user preview returns timezone and show_local_time for members and guests, since the preview now depends on them.
  • Checked by hand in the browser: the profile and the preview show the same line, also with a long bio.
  • Pest, Pint, Rector, vp fmt/vp lint, tsc and the JS unit tests pass. PHPStan reports two errors in EmbedKnowledgeBaseCommand.php, which are already on production. I couldn't run the 100% coverage step locally because I don't have a coverage driver.

Preview

Screenshot 2026-10-23 at 08 19 42

Profile previews now show the same local time line as the profile, under the bio, for people who chose to share it. LocalTime can render as a paragraph for this.
@nunomaduro
nunomaduro merged commit 9fedee9 into dev-null-sh:production Oct 26, 2026
nunomaduro pushed a commit that referenced this pull request Oct 26, 2026
#1186)

#1136 and #1014 were merged with tests that still created users with a
username, a column #1157 dropped when handles moved to profiles.
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