Skip to content

Notification improvements #498

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

Merged
merged 7 commits into from
Feb 21, 2025
Merged

Notification improvements #498

merged 7 commits into from
Feb 21, 2025

Conversation

andreascreten
Copy link
Contributor

@andreascreten andreascreten commented Feb 20, 2025

Added

  • Support for using a reference on notifications so you track down which notification an event happened on.
  • Support for actions and reply on notifications
  • Implemented more events handlers for notification events: reply, action, and closed.

Goes hand in hand with NativePHP/electron#168

@SRWieZ
Copy link
Member

SRWieZ commented Feb 20, 2025

Hi and thanks for the PR.

Did you managed to test this on your application?

I ask because I don't think the current facade permits the creation of buttons on Notifications.

@andreascreten
Copy link
Contributor Author

Hi and thanks for the PR.

Did you managed to test this on your application?

I ask because I don't think the current facade permits the creation of buttons on Notifications.

Added the missing methods to both the Notification class and the Facade.

@SRWieZ
Copy link
Member

SRWieZ commented Feb 20, 2025

Do you have a screenshot of it working ?

Because from the documentation, actions should be converted to NotificationAction object with a type.

@andreascreten
Copy link
Contributor Author

You are right! I was using the client directly to test locally, and while moving the code to the Notification class I forgot about the format that is expected. Pushed a fix, and here is a screenshot:

Screenshot 2025-02-20 at 21 34 24

For completeness, an example of a reply:
Screenshot 2025-02-20 at 21 37 16

@SRWieZ
Copy link
Member

SRWieZ commented Feb 20, 2025

Great!

I will take some time tomorrow to test your PR on my computer.

Can you PR the docs in the meantime?
https://github.com/NativePHP/nativephp.com/blob/main/resources/views/docs/desktop/1/the-basics/notifications.md

@andreascreten
Copy link
Contributor Author

Done deal!

NativePHP/nativephp.com#83

@PeteBishwhip
Copy link
Member

This is some amazing work. I'll also give this a test tomorrow and report back.

Thank you for your contribution!

@PeteBishwhip PeteBishwhip self-requested a review February 21, 2025 13:42
@SRWieZ SRWieZ merged commit dfcd9e2 into NativePHP:main Feb 21, 2025
22 checks passed
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.

3 participants