Various fixes and improvements#58
Merged
Merged
Conversation
[ci skip] [skip ci]
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements several fixes and improvements to the filter extension, including empty filter handling, email translation support, and username placeholder functionality.
- Fixes empty filter lines that would match everything by filtering out empty strings
- Adds support for email translations by removing hardcoded default email templates and introducing a %USERNAME% placeholder
- Updates dependencies and modernizes PHP code with typed properties and return types
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Listener/CheckPost.php | Modernizes PHP syntax with typed properties and fixes username handling in emails |
| src/CensorGenerator.php | Refactors leet speak replacements and adds filtering for empty filter strings |
| resources/locale/en.yml | Updates email template with %USERNAME% placeholder and adds translation help text |
| migrations/2025_08_29_000000_delete_default_email_template.php | Adds migration to remove old hardcoded email templates for translation support |
| js/src/admin/components/FilterSettingsPage.tsx | Adds help text for email translation functionality |
| js/package.json | Updates JavaScript dependencies to newer versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Changes proposed in this pull request:
Reviewers should focus on:
Migration I made to catch slight changes to template (case sensitivity, new lines) just to avoid needing people to clear manually as much as possible. It's kind of scuffed but should work as it matches line for line.
Screenshot
Confirmed
composer test).Required changes:
Related Flarum core extension PR's: (Omit this section if irrelevant)