Repository navigation
Let members watch an article and be told when a new version goes live - #38
Merged
Merged
Conversation
A Watch article button for signed-in members, a wiki_watch table, and a notification type that tells watchers when a version of the article goes live, whether a moderator approved it or a trusted editor's edit went live directly. The editor is never told about their own edit. With the new ACP setting Watch edited articles (on by default) saving an edit also watches the article. Watches are removed with the article and with the member. The existing awaiting-approval notification type also gets its English label. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The code sniffer (PSR2.Files.EndFileNewline) found two newlines at the end of event/listener.php. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
CI failed on the code sniffer: Investigated and written by Claude on behalf of William Jacoby (bonelifer). |
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.
What this does
Adds the "Watch/subscribe to an article" item from
docs/TODO.md. Until now the only wiki notification went to moderators when an edit awaited approval; a reader had no way to ask to be told when a particular article changes.wiki_watchtable, added by a migration along with the setting. They are removed when the article is deleted and when the member is deleted (core.delete_user_after).Testing
Claude ran two browser scripts on a phpBB 4.0 (master) board seeded with the wiki fixtures, and the first one again on fresh phpBB 3.3.19 boards with MySQL 8.0 and with PostgreSQL 16 (13 checks each, passing):
Ten new unit tests cover who may watch (guest, bot, member, a member who cannot view the wiki), the notification type, and that both languages have the notification's words and the email template. All 87 wiki unit tests pass, and the new and changed PHP files lint clean on PHP 8.5. The email itself was not sent: the test boards have outgoing email off, so only the template's placeholders were checked.
Investigated and written by Claude on behalf of William Jacoby (bonelifer).