@d86e/hive-panel 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/panel.js +13 -3
package/package.json
CHANGED
package/public/panel.js
CHANGED
|
@@ -3244,6 +3244,15 @@ function supervisorWorkerCount(row) {
|
|
|
3244
3244
|
return found ? total : null;
|
|
3245
3245
|
}
|
|
3246
3246
|
|
|
3247
|
+
function taskDisplayTitle(title) {
|
|
3248
|
+
const full = asString(title);
|
|
3249
|
+
if (!full) return full;
|
|
3250
|
+
const stripped = full
|
|
3251
|
+
.replace(/^[\w.-]+\/[A-Za-z]?\d+\s*[::]\s*/, "")
|
|
3252
|
+
.replace(/^[A-Za-z]+-\d+\s*[::]\s*/, "");
|
|
3253
|
+
return stripped || full;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3247
3256
|
function element(doc, tag, className, text) {
|
|
3248
3257
|
const node = doc.createElement(tag);
|
|
3249
3258
|
if (className) node.className = className;
|
|
@@ -6354,7 +6363,8 @@ export function mount(root, options = {}) {
|
|
|
6354
6363
|
|
|
6355
6364
|
function renderCard(card, lane, existing) {
|
|
6356
6365
|
const node = existing || element(doc, "article", "hive-card");
|
|
6357
|
-
const
|
|
6366
|
+
const fullTitle = card.title || translate("card.untitled");
|
|
6367
|
+
const title = taskDisplayTitle(fullTitle);
|
|
6358
6368
|
if (!existing) {
|
|
6359
6369
|
setAttr(node, "tabindex", "0");
|
|
6360
6370
|
setAttr(node, "role", "button");
|
|
@@ -6372,8 +6382,8 @@ export function mount(root, options = {}) {
|
|
|
6372
6382
|
node._hiveCard = card;
|
|
6373
6383
|
node._hiveLane = lane;
|
|
6374
6384
|
node._hiveTitle.textContent = title;
|
|
6375
|
-
setAttr(node, "aria-label", translate("card.openAria") + " " +
|
|
6376
|
-
setAttr(node, "title",
|
|
6385
|
+
setAttr(node, "aria-label", translate("card.openAria") + " " + fullTitle);
|
|
6386
|
+
setAttr(node, "title", fullTitle);
|
|
6377
6387
|
return node;
|
|
6378
6388
|
}
|
|
6379
6389
|
function renderStageChips(model) {
|