matomo-org / matomo-org/developer-documentation

Document how developers can create modals

Open
#279 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.