Events from pfe-content-set don't provide enough information to provide good analytics
Description of the issue
When an accordion (maybe tab as well) is clicked in pfe-content-set there isn't enough information to tell what has been expanded/collapsed, making analytics based on interaction impossible.
Impacted component(s)
- pfe-tabs
- pfe-accordion
- pfe-content-set
Steps to reproduce
- Go to https://www.redhat.com/en/contact
- In the console, add:
document.addEventListener('pfe-accordion:change', function(event) {
debugger;
});
- Click on an accordion to expand
- Event object target is set to pfe-content-set
-
event.pathdoes not exist in all browsers (but would fix the issue if it were) - Since accordions do not close siblings there isn't a reliable way to tell what was just opened without
event.path
PR is ready #IMO https://github.com/patternfly/patternfly-elements/pull/1769
Turned out this was only an issue with accordion.
Is this still relevant with 2.0's new events?
The issue wasn't the event system so much as the lack of data that was transmitted with the event.
Since we haven't moved PFE Content Set to PFE 2.0, this will be an issue for what replaces it (if something replaces it?).
In that case we'll transfer this issue to RHDS when it's available