More popup setting tweaks#122
Merged
iMattPro merged 4 commits intophpbb-extensions:mainfrom Jan 9, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the popup preference toggle UI from an icon-based button to a text-based button with clearer labeling. The changes improve the UX by making the toggle control more explicit and accessible.
Key changes:
- Replaced toggle icon button with a text-based input button showing "Enable reminders" or "Disable reminders"
- Separated
S_WEBPUSH_POPUP_PROMPT(feature availability) fromS_WEBPUSH_POPUP_DISABLED(user preference) for clearer logic - Updated language keys to reflect the new UI approach with
NOTIFY_WEBPUSH_POPUP_ENABLERandNOTIFY_WEBPUSH_POPUP_DISABLER
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/functional/functional_test.php | Updated test assertions to check button value attribute instead of icon classes |
| styles/prosilver/template/event/ucp_notifications_content_before.html | Replaced button with icon to input button with text value; wrapped toggle control in conditional |
| styles/all/template/webpush_popup.html | Enhanced popup display condition to explicitly check both feature availability and user preference |
| styles/all/template/webpush.js | Updated JavaScript handler to change button value instead of toggling icon classes |
| notification/method/webpush.php | Simplified S_WEBPUSH_POPUP_PROMPT logic by removing user preference check (now separate as S_WEBPUSH_POPUP_DISABLED) |
| language/ru/webpushnotifications_module_ucp.php | Added Russian translations for new button labels and updated existing text for clarity |
| language/en/webpushnotifications_module_ucp.php | Added English translations for new button labels and updated existing text for clarity |
After thorough review of all changes, I found no issues with the code. The refactoring is well-executed with:
- Consistent changes across all layers (templates, JavaScript, backend, tests, and translations)
- Improved separation of concerns between feature availability and user preferences
- Better UX with explicit text labels instead of icons
- Properly updated tests that match the new implementation
- Complete language support in both English and Russian
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.