SAFE-Stack / docs

https://safe-stack.github.io/docs/
MIT License
145 stars 69 forks source link

Elmish Toastr #57

Closed isaacabraham closed 4 years ago

isaacabraham commented 6 years ago

Include this somewhere in the docs

Zaid-Ajaj commented 6 years ago

If you mention Elmish.Toastr in the docs , you might as well mention Elmish.SweetAlert, they are very nice when used together, has live docs, up-to-date etc.

isaacabraham commented 6 years ago

I thought the same. I was actually thinking of having an option on the template called something like "client-extras" or something which would bring down a load of extra packages like toastr, sweetalert etc.. @theimowski what do you think?

theimowski commented 6 years ago

If it's just adding a new package not backed up by any code, I wouldn't add it to the template

isaacabraham commented 6 years ago

Documentation only then :-)

isaacabraham commented 6 years ago

I only thought it'll come to a point where I imagine there's a "batteries included" of many of these libraries like Toastr, SweetAlert etc. that we're always using - I can see that being a common request to just include all those packages if needed.

Zaid-Ajaj commented 6 years ago

@isaacabraham I think it is better for people to learn to install packages with multiple dependencies, it is just two commands instead of one (nuget + npm) and then everything just works

isaacabraham commented 6 years ago

@Zaid-Ajaj I get that. But (and I know I'm probably in the minority here!) the template wasn't designed to be a learning tool - we have the docs and the samples for that; it was designed to get people up and running with a stable, tested project structure as quickly as possible.

Think about the sorts of things most web applications use as cross cutting concerns. Alerts and toast notifications almost certainly fit in there, along with things like authentication, logging etc. These are things I want us to make as easy as possible so that people can (a) focus on solving business problems and (b) be wowed and amazed at how easy this stuff is with Fable, Elmish, Saturn etc. - rather than continually having to refer back to documentation to find out what the appropriate library is.

isaacabraham commented 5 years ago

Coming back to this - I installed Toastr today for the first time. I have to say that docs that in the readme are good, so even I was able to get it working first time :-) Nonetheless, I wonder if there's any way we could make it easier to install it?

For example, being able to have a command (even in the fake script?) like "install toastr" that would modify the webpack file, add the dependencies to yarn and paket etc. etc.?

Just thinking aloud here - this might be a terrible idea and please say so if it is :-)

isaacabraham commented 5 years ago

@Zaid-Ajaj why would you use toastr instead of sweet alert when sweet alert has toast capabilities as well?

Zaid-Ajaj commented 5 years ago

Coming back to this - I installed Toastr today for the first time. I have to say that docs that in the readme are good, so even I was able to get it working first time :-) Nonetheless, I wonder if there's any way we could make it easier to install it?

It it not trivial to go mutate.js source code (the webpack config) from another program in a robust way (for example you would have to check whether the style loaders are already installed in npm packages and whether they are already included in the loaders of weback etc.)

That said, it is still possible to create a cli tool that automates this but I am not that far yet :)

would you use toastr instead of sweet alert when sweet alert has toast capabilities as well?

Just a personal preference, I like the UI of toastr when it comes to toasts but you are probably fine if you use sweet alert only (and it will save you quite some kb on the bundle size)

isaacabraham commented 5 years ago

Yeah, I think we should look at this as a SAFE thing - there are several components that we should be pushing as the core set of libraries that will let people get up and running. Documentation is the cheapest way of raising awareness of them, but some kind of automated way to add a library would be awesome. This might not be possible, but we should think about it from a broader perspective.

forki commented 5 years ago

Docs are way more important than scaffolding

Am Mi., 14. Nov. 2018, 18:48 hat Isaac Abraham notifications@github.com geschrieben:

Yeah, I think we should look at this as a SAFE thing - there are several components that we should be pushing as the core set of libraries that will let people get up and running. Documentation is the cheapest way of raising awareness of them, but some kind of automated way to add a library would be awesome. This might not be possible, but we should think about it from a broader perspective.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SAFE-Stack/docs/issues/57#issuecomment-438754346, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNM6JamnabqKoXYeXnhA3GZky0nsPks5uvFdpgaJpZM4VljFm .

isaacabraham commented 4 years ago

Closing with a recipe link