Skip to content
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

Modernise + marking notifications as "unread" #27

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chriscpty
Copy link

The main feature in this PR is that, like clicking a notification's "mark read" icon to mark it as read, clicking it on a read notification marks that notification as unread.

In the process, I modernised the notifications.js file (and syntax in the other edited files ;D) a bit and added the ability to mark notifications as read/unread from the default index page - this didn't work before.

I also made the widget pass in the i18n'd labels for "Mark as read" or "Mark as unread" - before that, the labels would default to the ones defined in notifications.js.

BREAKING CHANGES

This PR introduces the following breaking changes:

  • Bump minimum PHP version from 7.1 to 8.1 (7.1 has long been EOL). This also fixes PHP 8 support #24 .
  • Update minishlink/web-push dependency accordingly
  • Browsers that do not support ES6 syntax can no longer run the notifications.js plugin

potential TODOs

  • The added i18n for "Mark as unread" is currently generated using google translate for spanish, italian and portuguese. As someone who speaks neither of those languages, the translations look correct to me, but a native speaker should maybe take a look at them :D

+ cleanup a little bit
+ bump versions where applicable

#5864
+ mark as unread logic
o cleanup and modernise syntax
o show mark as read icons without hover
+ pass in i18n'd labels from Notifications widget
+ mark as read/unread logic in index

#5864
o update readme

#5864
o undo changes so that this can be upstreamed

#5864
! use .dropdown-item rather than .notification-item for notifications
! remove type declarations from DefaultController to undo breaking changes

#5864
o changes during code-review

#5864
@deadmantfa
Copy link

I am not sure its maintained now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8 support
2 participants