Log events for pinnable header button

Bug: T324878
Change-Id: I3174fc7f90b106c32ae4eb1fb42d089e01967220
This commit is contained in:
Jon Robson 2023-01-05 11:43:14 -08:00
parent bffa375753
commit b27e4d0656
3 changed files with 10 additions and 10 deletions

View file

@ -7,6 +7,6 @@
{{#data-unpinned-container-id}}data-unpinned-container-id="{{.}}"{{/data-unpinned-container-id}}
>
<{{label-tag-name}} class="vector-pinnable-header-label">{{label}}</{{label-tag-name}}>
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button">{{pin-label}}</button>
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button">{{unpin-label}}</button>
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.{{data-name}}.pin">{{pin-label}}</button>
<button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.{{data-name}}.unpin">{{unpin-label}}</button>
</div>

View file

@ -8,8 +8,8 @@ exports[`Pinnable header renders 1`] = `
<div id=\\"unpinned-container\\">
<div id=\\"pinnable-element\\"> <div class=\\"vector-pinnable-header simple-pinnable-header vector-pinnable-header-unpinned\\" data-name=\\"simple\\" data-pinnable-element-id=\\"pinnable-element\\">
<div class=\\"vector-pinnable-header-label\\">simple pinnable element</div>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\">pin</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\">unpin</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\" data-event-name=\\"pinnable-header.simple.pin\\">pin</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\" data-event-name=\\"pinnable-header.simple.unpin\\">unpin</button>
</div>
</div>
</div>

View file

@ -9,8 +9,8 @@ exports[`Table of contents re-rendering re-renders toc when wikipage.tableOfCont
"<div id=\\"vector-toc\\" class=\\"vector-toc vector-pinnable-element\\"><div id=\\"vector-toc\\" class=\\"vector-toc vector-pinnable-element\\">
<div class=\\"vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned\\" data-name=\\"vector-toc\\">
<h2 class=\\"vector-pinnable-header-label\\">Contents</h2>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\">hide</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\" data-event-name=\\"pinnable-header.vector-toc.pin\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\" data-event-name=\\"pinnable-header.vector-toc.unpin\\">hide</button>
</div>
<ul class=\\"vector-toc-contents sidebar-toc-contents\\" id=\\"mw-panel-toc-list\\">
<li id=\\"toc-mw-content-text\\" class=\\"vector-toc-list-item vector-toc-level-1 sidebar-toc-list-item sidebar-toc-level-1\\">
@ -79,8 +79,8 @@ exports[`Table of contents renders when \`vector-is-collapse-sections-enabled\`
"<div id=\\"vector-toc\\" class=\\"vector-toc vector-pinnable-element\\">
<div class=\\"vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned\\" data-name=\\"vector-toc\\">
<h2 class=\\"vector-pinnable-header-label\\">Contents</h2>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\">hide</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\" data-event-name=\\"pinnable-header.vector-toc.pin\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\" data-event-name=\\"pinnable-header.vector-toc.unpin\\">hide</button>
</div>
<ul class=\\"vector-toc-contents sidebar-toc-contents\\" id=\\"mw-panel-toc-list\\">
<li id=\\"toc-mw-content-text\\" class=\\"vector-toc-list-item vector-toc-level-1 sidebar-toc-list-item sidebar-toc-level-1\\">
@ -140,8 +140,8 @@ exports[`Table of contents renders when \`vector-is-collapse-sections-enabled\`
"<div id=\\"vector-toc\\" class=\\"vector-toc vector-pinnable-element\\">
<div class=\\"vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned\\" data-name=\\"vector-toc\\">
<h2 class=\\"vector-pinnable-header-label\\">Contents</h2>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\">hide</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-pin-button\\" data-event-name=\\"pinnable-header.vector-toc.pin\\">move to sidebar</button>
<button class=\\"vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button\\" data-event-name=\\"pinnable-header.vector-toc.unpin\\">hide</button>
</div>
<ul class=\\"vector-toc-contents sidebar-toc-contents\\" id=\\"mw-panel-toc-list\\">
<li id=\\"toc-mw-content-text\\" class=\\"vector-toc-list-item vector-toc-level-1 sidebar-toc-list-item sidebar-toc-level-1\\">