matomo-org / matomo-org/developer-documentation
Document how developers can create modals
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 58
- Forks
- 88
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 13
Description
suggested in https://forum.matomo.org/t/matomo-dialog-modal-developers/29860
original post below:
------
I don't know for sure if it is documented, but I couldn't find anything about how to use Matomo dialogs/modals. For those looking to implement, for example, a confirmation modal, do this:
In your twig:
```
{{ sendNotificationConfirm }}
```
In your script (wrap the following into a function called by a click event or any event you prefer):
```
piwikHelper.modalConfirm(makeSelectorLastId('sendNotificationConfirm'), {
yes:
function () {
// Code you want to be executed when the user hit "Yes"
}
});
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked forum post and the existing Matomo developer documentation to find the appropriate place for this guidance. Document the shown Twig modal markup and JavaScript modalConfirm usage, with completion marked by a discoverable example that lets developers follow the confirmation-modal setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100