New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vue] migrate manage goals directive and twig templates to Vue #18917
Conversation
…named slots, does not work in all cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diosmosis This seems to work smoothly on the reporting pages. But when going to goal management within the admin it seems the info about funnels and multi attribution are not shown:
It's also not loaded when editing or creating the goal there.
…g events since piwik-manage-goals is selected for in plugins and because angularjs directives are sometimes pre-compiled, sometimes not
@sgiehl hopefully its fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works now 👍
Description:
Changes:
const
in piwikHelper.js as that should be vanilla JS.Notes:
postEvent
call is used. This is the simpler approach and works in cases where the twig template was not parameterized. It doesn't work when, eg, the event is called inside a twig for loop, as that can't be translated to a v-for loop in the frontend.<component :is=...
. This allows us to iterate over data in the twig template, save the result and pass it to Vue for use. The<component :is
usage is done specifically so the HTML is directly inserted. Using v-html would require a parent element which is not always acceptable (eg, when a postEvent() call is made between<th>
or<td>
elements.Both approaches will be documented.
Review