discourse/lib/onebox/templates
Régis Hanol 9d1bfb73f3
UX: Show contextual dates on GitHub PR oneboxes (#36637)
Previously, GitHub PR oneboxes always showed "opened on [date]"
regardless of the PR's status. This could be misleading for merged or
closed PRs where the relevant date is when that action occurred.

Now the date label and value match the PR status:
- open/draft: "opened/drafted on [created_at]"
- approved/changes_requested: "[status] on [review submitted_at]"
- merged/closed: "merged/closed on [merged_at/closed_at]"

Also removes an unused GITHUB_COMMENT_REGEX constant from
github_repo_onebox.rb.

**Here are a few examples**

<img width="743" height="1035" alt="CleanShot 2025-12-11 at 18 10 42"
src="https://github.com/user-attachments/assets/810893a5-2563-4a19-96a1-7bf876e2d27c"
/>
2025-12-11 20:10:24 +01:00
..
github
json_ld_partials
_layout.mustache A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572) 2025-07-11 09:55:48 -04:00
allowlistedgeneric.mustache A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572) 2025-07-11 09:55:48 -04:00
amazon.mustache FIX: correctly unescape title for amazon oneboxes (#33010) 2025-06-02 17:50:13 +05:30
discourse_category_onebox.mustache
discourse_topic_onebox.mustache UX: improve quote title alignment, wrapping (#33796) 2025-07-23 16:21:55 -04:00
discourse_user_onebox.mustache UX: Upgrade to fontawesome 6.6.0 (#28778) 2024-09-09 14:40:56 +01:00
discoursetopic.mustache
githubactions.mustache
githubblob.mustache UX: Improve git blob oneboxes (#30694) 2025-01-10 11:49:36 +00:00
githubcommit.mustache A11Y: remove redundant alt text from github oneboxes (#30083) 2024-12-04 12:25:03 +11:00
githubfolder.mustache
githubgist.mustache DEV: Avoid empty p tag in github gist onebox (#35628) 2025-10-27 16:21:14 +01:00
githubissue.mustache A11Y: remove redundant alt text from github oneboxes (#30083) 2024-12-04 12:25:03 +11:00
githubpullrequest.mustache UX: Show contextual dates on GitHub PR oneboxes (#36637) 2025-12-11 20:10:24 +01:00
githubrepo.mustache FEATURE: Allow oneboxing private GitHub repo URLs and add private indicator to HTML (#27947) 2024-07-19 12:21:45 +10:00
gitlabblob.mustache UX: Improve git blob oneboxes (#30694) 2025-01-10 11:49:36 +00:00
googledocs.mustache
googledrive.mustache
googleplayapp.mustache
hackernews.mustache
instagram.mustache
pastebin.mustache
pdf.mustache
preview_error_fragment_onebox.mustache
preview_error_onebox.mustache A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572) 2025-07-11 09:55:48 -04:00
pubmed.mustache
stackexchange.mustache
threadsstatus.mustache A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572) 2025-07-11 09:55:48 -04:00
twitterstatus.mustache A11Y: onebox avatars/images are decorative, so screenreaders can skip (#33572) 2025-07-11 09:55:48 -04:00
wikimedia.mustache
wikipedia.mustache
xkcd.mustache