[BUG] Header dropdown menu items no longer show badges
Describe the bug
Header dropdown menu items no longer show their badge. convertHtmlToItems() in src/main/js/components/dropdowns/utils.js ignores the data-dropdown-badge-* attributes that lib/layout/dropdowns/item.jelly emits, so Templates.menuItem() never renders .jenkins-dropdown__item__badge.
Steps to reproduce
- On Jenkins 2.556 or later (current weekly, LTS 2.568.x included), log in and open your user Security page.
- Generate an API token with an expiration date within the next 7 days.
- Open the avatar dropdown in the header.
Expected behavior The "Security" entry shows the warning badge "1" with the tooltip about the expiring token, as it did in 2.548-2.555 (badge introduced by #23859).
Actual behavior
The avatar button shows the warning dot, but the "Security" entry inside the dropdown has no badge. The same path also drops badges of plugin RootActions in the hamburger menu (#10791, JENKINS-75832).
Reproducible example / evidence
// Emitted by item.jelly, ignored since #11204 (611294d365)
<template data-dropdown-type="ITEM" data-dropdown-text="Security"
data-dropdown-badge-text="1" data-dropdown-badge-severity="warning" .../>#11204 rewrote convertHtmlToItems() and removed the block that copied the three badge attributes into item.badge; producer (jelly) and consumer (templates.js badge()) are unchanged.
Environment
- Jenkins version: 2.556 and later, master @ 003f706d2f
- Java version: N/A
- OS: N/A
- Browser (UI bugs only): any
Source: jenkinsci/jenkins