- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9.7k
          [Notifier] Support for desktop notifications via jolicode/JoliNotif
          #57683
        
          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
  
    [Notifier] Support for desktop notifications via jolicode/JoliNotif
  
  #57683
              Conversation
        
          
                src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
      cb50c31    to
    8b85aff      
    Compare
  
    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.
Here are some CS comments.
I'm also wondering if we need another channel type or if we could go with the push channel.
WDYT?
        
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransport.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransport.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransport.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 
 I actually prefer to create a new channel for this, as sending notifications here relies on executable binaries (some of which exist natively in the OS, and some are shipped portably with the underlying package). So, there are no API calls or network activity involved. And this is quite different for me (at least) from what the  Maybe naming it as  | 
| 
 Maybe  | 
| 
 I'll wait for some time before updating to make sure there are no objections or points raised. | 
| Are there any technical implications related to using Push or Desktop for channels? (Desktop looks fine to me if we need to go with another channel) | 
| No, at least for the current bridge we're adding. I've tested it with PushChannel and it worked normally. Going for another channel was just for consistency as this bridge behaving slightly different from the other bridges. | 
        
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/Tests/JoliNotifOptionsTest.php
          
            Show resolved
            Hide resolved
        
      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.
@ahmedghanem00 Can you fix the 2 small changes I've added?
        
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifOptions.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/Symfony/Component/Notifier/Bridge/JoliNotif/JoliNotifTransport.php
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | Can you please open a docs PR? Thanks | 
| 
 Will do it | 
| Can you please check the failing related tests? Thanks | 
| I've checked but didn't catch anything related. Most of them are because of this PR has not been merged yet. | 
| 
 | 
37688c7    to
    81f99b9      
    Compare
  
    | 
 Not sure why this class does not get detected during the remaining test (8.2, low-deps). | 
| Can you please create a docs PR and a recipe PR? Thanks | 
| 
 They are already created above :) | 
| 
 The reason is that on this job an older version of the Notifier component is installed. Then, the desktop notifier is not present. We need to make sure that inside the  | 
| @ahmedghanem00 Can you rebase to get rid of the merge commit? | 
a1e9bd2    to
    cef6fc1      
    Compare
  
    | @fabpot Done? | 
| */ | ||
| final class JoliNotifTransportFactory extends AbstractTransportFactory | ||
| { | ||
| private const SCHEME_NAME = 'jolinotif'; | 
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.
should the scheme be joli-notif to be consistent with the package name ?
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.
I actually feel that it's more readable without the dash, I also have seen many similar bridges following the same pattern in naming the scheme without applying the kebab-case.
3f67b0c    to
    bcd4677      
    Compare
  
    | Thank you @ahmedghanem00. | 
…e (ahmedghanem00) This PR was squashed before being merged into the 7.2 branch. Discussion ---------- [Notifier] Create `DesktopChannel` and `JoliNotif` bridge Updating docs according to symfony/symfony#57683 Fixes #20168 Commits ------- 45ba59f [Notifier] Create `DesktopChannel` and `JoliNotif` bridge

Per the linked issue, this PR will provide the ability to display desktop notifications using the Symfony-Notifier-Component, via the underlying package
jolicode/JoliNotifin the meantime, or via any other underlying package that may come or exist in the future (after creating the appropriate bridge and attach it to theDesktopChannelof course 😀).Two additional PRs will also be initiated against
symfony/docs&&symfony/recipesrespectively, once the code review has some positive progress here.Thanks.