Skip to content

AO3-2312 Add kudos to admin posts#5931

Open
Bilka2 wants to merge 4 commits into
otwcode:masterfrom
Bilka2:AO3-2312-admin-post-kudos
Open

AO3-2312 Add kudos to admin posts#5931
Bilka2 wants to merge 4 commits into
otwcode:masterfrom
Bilka2:AO3-2312-admin-post-kudos

Conversation

@Bilka2

@Bilka2 Bilka2 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Issue

https://otwarchive.atlassian.net/browse/AO3-2312

Purpose

Adds kudos to news posts. They can be given at the bottom of the post, similar to works and are shown there. They have the same restrictions as work kudos (not on drafts, not by admins, not by official accounts etc). They use the same pagination mechanism as work kudos. They're shown on the blurb on the homepage, next to the comments count, but they are not shown in the sidebar of AdminPostsController#index.

Testing Instructions

TBD

References

Adopted #3082

PR Limit: 6 out of 5
Using reviewer bonus:
#5012
#4991

Credit

tuff (original PR)
ariana-paris (original PR review)
james_ (original PR review)
sarken (original PR review)
Bilka (original PR review)
Bilka

@@ -5,16 +5,20 @@
<% if has_user_kudos || guest_kudos_count > 0 %>
<% cache "#{commentable.cache_key}/kudos-v4", expires_in: ArchiveConfig.MINUTES_UNTIL_COMMENTABLE_KUDOS_LISTS_EXPIRE.minutes, race_condition_ttl: 10.seconds, skip_digest: true do %>

@Bilka2 Bilka2 Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I debated updating the cache key here, but the i18n should match exactly the text that was there before and the admin post cache keys are unique from the work cache keys, so the cache should not need to be cleared.

The i18n in this file and kudos/index.html.erb is based on how the similar text in the kudos notification email is i18ned.

<h2 class="heading">
<%= search_header(@kudos, nil, "User") %> Who Left Kudos on <%= link_to(@work.title, @work) %>
<% kudos_target = @work || @admin_post %>
<%= search_header(@kudos, nil, "User") %> Who Left Kudos on <%= link_to(kudos_target.title, kudos_target) %>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I left this untranslated because it has to be part of search_header for plural and that's getting handled in AO3-7357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants