-
Notifications
You must be signed in to change notification settings - Fork 2
More improvements to popup prompt #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the web push notification popup prompt with improved accessibility, user experience, and GDPR compliance features. The main additions include keyboard navigation (Escape key support), comprehensive ARIA attributes for screen readers, and a persistent user preference to disable the popup prompt across all devices.
Key changes include:
- Escape key functionality to dismiss the popup prompt
- ARIA attributes (role, aria-modal, aria-labelledby, aria-describedby) for better screen reader support
- New database column and UCP toggle control for users to permanently disable popup prompts
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| ucp/controller/webpush.php | Adds toggle_popup() controller method to handle user preference changes for disabling popup prompts |
| notification/method/webpush.php | Updates template data to include toggle URL and checks user preference when determining whether to show popup |
| migrations/add_user_popup_preference.php | Creates database migration to add user_wpn_popup_disabled column to users table |
| config/wpn_ucp.yml | Registers new route for the toggle popup controller endpoint |
| styles/all/template/webpush.js | Implements escape key handler, hidePopup() helper function, and togglePopupHandler() for preference updates |
| styles/all/template/webpush_popup.html | Adds ARIA attributes for accessibility (role, aria-modal, aria-labelledby, aria-describedby, aria-hidden) |
| styles/prosilver/template/event/ucp_notifications_content_before.html | Adds toggle button UI in UCP notifications settings with icon-based state indicator |
| styles/all/template/ucp_notifications_webpush.html | Passes toggle popup URL to JavaScript initialization |
| styles/all/theme/phpbb_wpn.css | Adds grid-based layout for notification settings with responsive breakpoints and toggle icon styling |
| tests/functional/functional_test.php | Adds functional test covering toggle button presence and state changes |
| tests/controller/controller_webpush_test.php | Adds unit tests for toggle functionality including edge cases (invalid tokens, non-AJAX, anonymous users) |
| language/en/webpushnotifications_module_ucp.php | Adds English translations for toggle feature and updates popup title text |
| language/ru/webpushnotifications_module_ucp.php | Adds Russian translations for toggle feature and updates popup title text |
| controller/manifest.php | Fixes parse_url() usage to specify PHP_URL_PATH parameter explicitly for better code clarity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
styles/prosilver/template/event/ucp_notifications_content_before.html
Outdated
Show resolved
Hide resolved
| .wpn-fieldset .fa-toggle-on { | ||
| color: #105289; | ||
| } | ||
|
|
||
| .wpn-fieldset .fa-toggle-off { | ||
| color: #5d5d5d; | ||
| } |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing focus styles for the toggle button. The .wpn-toggle-button class is used in the template but has no CSS styling defined, including focus indicators. Keyboard users need visible focus indicators to navigate the interface. Add focus styles for this button to ensure accessibility compliance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
Improvements made in this PR: