Add an ability to set and reset Toastify options globally
☑️ Resolves
- Add
setGlobalToastOptions(options: ToastOptions)function - Add
resetGlobalToastOptions()function - Update README.md
- Fix typos, remove redundant comments
- Close #380
🚧 Tasks
- [ ] Code review
- [x] ⛑️ Tested in sandbox and Talk
- [ ] 📘 API or User documentation - should be updated?
This makes it still local to the app
This makes it still local to the app
That shouldn't be the problem, if we're going to define a container separately for each application.
For example, in Files app container is <main id="content" class="app-files">,
when in Talk it is <div id="content-vue" class="content app-talk">.
So if we manage to set the global selector for the whole NC instance, it's still needs to be manually changed for Talk, which makes not much sense in that case
This makes it still local to the app
The question is, do we want to make it globally across the apps?
- On one hand, it may solve a problem then toasts from one app don't work because of the layout of another app.
- On the other hand, in this case, one app changes the behavior of another app in a possibly unexpected way.
I'm not sure if p.1 is an actual problem.
What about to start with a module-wide global and then if there will be a case, to add a fully global option?
On one hand, it may solve a problem then toasts from one app don't work because of the layout of another app.
That is actually one of the problems we try to solve. Currently when the Talk fullscreen option is used, the integrations of deck, tasks, etc. all miss their toasts as they are still displayed on the body, instead of the fullscreened container.
Then can we store the value for the default selector in the window, similar to @nextcloud/l10n?
https://github.com/nextcloud/nextcloud-l10n/blob/186d34ae2eb53cab52779306d5d52cea35966acc/lib/registry.ts#L69