Document the importance of vector-menu class

It's used by click tracking so marking with inline comment that
we need to be careful if we plan to remove it in our current
refactoring.

Change-Id: I6aee01363d2d150844e61fb27ab584c8ee78c4ae
This commit is contained in:
Jon Robson 2023-01-03 12:03:42 -08:00
parent e1639d0672
commit 3dbadabdfe
5 changed files with 4 additions and 3 deletions

View file

@ -2,6 +2,7 @@
See @typedef MenuDefinition
}}
{{! this template must be used with Dropdown/Close to avoid unclosed HTML tags }}
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
<div id="{{id}}" class="vector-menu vector-dropdown vector-menu-dropdown{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
{{!
Dropdown menus use the checkbox hack and require `input` and `label` elements.

View file

@ -2,7 +2,7 @@
See @typedef MenuDefinition
}}
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
<nav id="{{id}}" class="vector-menu{{#class}} {{.}}{{/class}}" aria-labelledby="{{id}}-label" role="navigation" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
{{#is-dropdown}}
<input type="checkbox"

View file

@ -1,7 +1,7 @@
{{!
See @typedef MenuDefinition
}}
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
<div id="{{id}}" class="vector-menu{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
{{#label}}
<div class="vector-menu-heading{{#label-class}} {{.}}{{/label-class}}">

View file

@ -1,6 +1,7 @@
{{!
See @typedef MenuDefinition
}}
{{! DO NOT REMOVE vector-menu class. It is used for click tracking in Extension:WikimediaEvents }}
<div id="{{id}}" class="vector-menu vector-menu-tabs{{#class}} {{.}}{{/class}}" {{{html-tooltip}}} {{{html-user-language-attributes}}}>
{{>MenuContents}}
</div>

View file

@ -2,7 +2,6 @@
exports[`UserLinks renders 1`] = `
"<nav class=\\"vector-user-links\\" aria-label=\\"\\" role=\\"navigation\\">
<div id=\\"p-personal-more\\" class=\\"vector-menu mw-portlet mw-portlet-vector-user-menu-overflow vector-user-menu-overflow\\">
<div class=\\"vector-menu-heading\\">
Toggle sidebar