Clean up extra attributes set in `clipboard_button` helper
Context
The following discussion from !53224 (merged) should be addressed:
-
@pslaughter started a discussion: note (non-blocking): It seems to me that there's a lot of extraneous things we leave in this object we're passing to
data
(i.e.class
andhide_tooltip
). When we read these values, I think we intend to pop them out of the object so they don't end up written to the HTML as data attributes (i.e.data-class
)🤔 This is a pre-existing problem, so it shouldn't block this MR but might be nice to clean up in a follow-up.
On .com
, you'll notice clipboard buttons have weird data attributes because of this:
Investigation Notes
In the clipboard_button
helper, we could probably just use .delete
instead of reading the various keys so that the keys are also removed and not added to the element's data
attributes.