HomePhabricator

Allow 'data-*' attributes in personal tools links

Description

Allow 'data-*' attributes in personal tools links

We are limiting the attributes that are read and rendered for the
personal toolbar, but there are cases -- especially as tools get
more and more complex -- for needing to supply and read more information.

The use case that led to this change is the need to style Notification
badges with values in ::before and ::after pseudo-elements; these
elements need to display some prefixed content, and the best (only)
way to do that in no-js mode, is to set it up in CSS to be read
out of an attribute (using attr( xxx ); ).

This means that we need to read a specific attribute from the element,
but the only attributes allowed were insufficient. Allowing for data-*
attributes seemed not only a good solution for this specific case,
but a good idea in general for future tools that are added and
manipulate the personal toolbar links - allowing for storing information
without polluting the DOM.

Bug: T115845
Change-Id: Ic666540d70de52f337f839da0518cb83a990f5fd

Details

Provenance
MooeypooAuthored on Jul 20 2016, 9:15 PM
Parents
rMW161e8669fe28: Merge "Simplify lock release in LinksDeletionUpdate"
Branches
Unknown
Tags
Unknown
ChangeId
Ic666540d70de52f337f839da0518cb83a990f5fd