AO3-2312 Add kudos to admin posts#5931
Open
Bilka2 wants to merge 4 commits into
Open
Conversation
Bilka2
commented
Jul 12, 2026
| @@ -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 %> | |||
Contributor
Author
There was a problem hiding this comment.
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.
Bilka2
commented
Jul 12, 2026
| <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) %> |
Contributor
Author
There was a problem hiding this comment.
I left this untranslated because it has to be part of search_header for plural and that's getting handled in AO3-7357
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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