kusti8 / proton-native

A React environment for cross platform desktop apps
https://proton-native.js.org
MIT License
10.91k stars 361 forks source link

Feature: Add native notifications support #127

Closed bardiarastin closed 6 years ago

bardiarastin commented 6 years ago

Hello, awesome project 👏👏👏

I was able to add native OS notifications using https://github.com/mikaelbr/node-notifier

image

I'm thinking of that we can add this lib to project to have built in notification support simply by bridging.

I can make a PR for this if everything is okay with adding support for notifications, along side this, I have a lot of other ideas and things missing in this project like lack of support for printing for example...

mischnic commented 6 years ago

Proton-native is based on libui, there is an issue for notifications there (https://github.com/andlabs/libui/issues/338), but it's not going to happen very soon (if ever): "I still don't know if this is in scope for libui."

printing for example

How should that work? What would you like to print? (PDFs, images?)

bardiarastin commented 6 years ago

@mischnic I taught that libui is only for UI stuff and nothing more so we should consider adding other extra stuff ourselves. please let me know if you decided to do it in proton native I have ideas for performance of this (electron app with 3000 daily active users).

for printing there are some several functionalities needed. like a method to return OS printers, a method to print with options like which printer, page size, adjusting margins and...

what we needed was printing an html document in electron which we could make a browser window put html into that with whatever css we wanted then print it, along side support for image printing, I can make a separate issue for printing.

mischnic commented 6 years ago

I taught that libui is only for UI stuff and nothing more so we should consider adding other extra stuff ourselves.

I would say that notifications are part of the ui.

please let me know if you decided to do it in proton native I have ideas for performance of this (electron app with 3000 daily active users).

With my previous comment I wanted to say: it should be done this way because it won't happen in libui.

What keeps you from using that library together with proton-native as it is?

for printing there are some several functionalities needed. like a method to return OS printers, a method to print with options like which printer, page size, adjusting margins and...

What about https://github.com/tojocky/node-printer ? (Haven't tested it myself)

kusti8 commented 6 years ago

If there's no special thing that needs to be done on Proton Native to make it work, it's best if it's not merged. This leads to additional and additional libraries being merged just bloating the project. I can mention it in the documentation, but I'd rather not add another library.