nextcloud-libraries / nextcloud-dialogs

Nextcloud dialog helpers https://npmjs.org/@nextcloud/dialogs
https://nextcloud-libraries.github.io/nextcloud-dialogs/
GNU Affero General Public License v3.0
18 stars 9 forks source link

Add toast #80

Closed juliusknorr closed 4 years ago

juliusknorr commented 4 years ago

Either we add a wrapper for OCP.Toast or maybe we can even add the toast logic and toastify-js directly to this package.

https://github.com/nextcloud/server/blob/master/core/src/OCP/toast.js

ChristophWurst commented 4 years ago

Yes please!

I'd say we should try to package it. Then it's isolated and this package is less dependent on the server's global variables.

juliusknorr commented 4 years ago

Done with https://github.com/nextcloud/nextcloud-dialogs/pull/84

ChristophWurst commented 4 years ago

And shipped with https://github.com/nextcloud/nextcloud-dialogs/releases/tag/v1.1.0 :shipit:

skjnldsv commented 4 years ago

Question, we're not using the css in this repo, right?

skjnldsv commented 4 years ago

Ah right, @nextcloud/dialogs/styles/toast. Hum, it means we're style relying on server for icons and stuff as we don't compile them :thinking:

ChristophWurst commented 4 years ago

Ah right, @nextcloud/dialogs/styles/toast

But users of this lib have to import this manually, right? We should document this.

juliusknorr commented 4 years ago

It is documented:

Make sure that the @nextcloud/dialogs/styles/toast file is included in your app to make sure that the toasts have a proper styling applied.

Now the only issue I see are the icons that are used, but we could actually just inline them in the css.

ChristophWurst commented 4 years ago

It is documented

Sorry :see_no_evil:

skjnldsv commented 4 years ago

Now the only issue I see are the icons that are used, but we could actually just inline them in the css.

Yep, I'm on it :)