diff --git a/changelog.d/fixed-row-menu-hint-wrap.md b/changelog.d/fixed-row-menu-hint-wrap.md new file mode 100644 index 0000000000..6567b606e4 --- /dev/null +++ b/changelog.d/fixed-row-menu-hint-wrap.md @@ -0,0 +1 @@ +- Activity Monitor: the row menu's consequence hints ("merges #15118 into v5 now via hive's identity, attributed to you", "records your approval; the hive's merge sweep merges #15118 on its next pass…") no longer run past the menu border over the rows behind it — a menu with hints grows wider (capped to the viewport) and each hint wraps on its own line under its label, the rescan hint included (#15175). diff --git a/src/pkg/dashboard/stage_tracker_row_actions_test.go b/src/pkg/dashboard/stage_tracker_row_actions_test.go index 76a1215d6b..4ad770081a 100644 --- a/src/pkg/dashboard/stage_tracker_row_actions_test.go +++ b/src/pkg/dashboard/stage_tracker_row_actions_test.go @@ -68,6 +68,7 @@ func stageTrackerRowActionsPreamble(t *testing.T, html string) string { jsFunc(t, html, "stageTrackerFlatActions"), jsFunc(t, html, "stageTrackerSelectionActions"), jsFunc(t, html, "stageTrackerMenuItemHtml"), + jsFunc(t, html, "stageTrackerMenuHasHints"), jsFunc(t, html, "stageTrackerMenuHtml"), jsFunc(t, html, "stageTrackerMenuPosition"), jsFunc(t, html, "stageTrackerSelBarHtml"), @@ -285,7 +286,7 @@ assert.strictEqual(by.open.enabled, true); // Menu markup. const menu = stageTrackerMenuHtml(as, 'o/r#1 · Parked'); -assert.ok(menu.startsWith('
')); assert.strictEqual((menu.match(/role="menuitem"/g) || []).length, 11, 'six top-level items + five decide options'); assert.ok(menu.includes('data-ham-act="hold" tabindex="-1" aria-disabled="true" title="' + STAGE_TRACKER_WHY_WRITE + '"'), 'disabled items carry the reason'); @@ -620,7 +621,7 @@ const one = { ...issue, linked_prs: [issue.linked_prs[1]] }; assert.strictEqual(stageTrackerDecisionTarget(one).number, 15020, 'one parked PR: the issue row decides it, as before'); assert.ok(!ids(stageTrackerRowActions(one, ctx)).includes('decide:delegate-all')); const menu = stageTrackerMenuHtml(stageTrackerRowActions(issue, ctx), 'x'); -assert.ok(menu.includes('data-ham-act="decide:delegate-all"') && menu.includes('Let hive decide — all 2 PRs')); +assert.ok(menu.includes('data-ham-act="decide:delegate-all"') && menu.includes('Let hive decide — all 2 PRs')); // The selection model runs over sub-rows: keys in document order, painted // on the sub nodes; a sub-row click selects the PR, not its parent. @@ -1086,7 +1087,13 @@ const at = s => menu.indexOf(s); assert.ok(at('data-ham-act="decide:merge-now"') > 0 && at('data-ham-act="decide:merge-now"') < at('data-ham-act="decide:queue-merge"')); assert.ok(at('data-ham-act="decide:queue-merge"') < at('data-ham-act="decide"'), 'merge answers above Decide…'); assert.ok(at('data-ham-act="decide"') < at('data-ham-act="hold"') && at('data-ham-act="hold"') < at('data-ham-act="open"'), 'generic items last'); -assert.ok(menu.includes('') || menu.includes(''), 'consequence line rendered: ' + menu); +assert.ok(menu.includes('') || menu.includes(''), 'consequence line rendered: ' + menu); +// Hints stack under their label and the menu grows for them (#15175). +assert.ok(menu.startsWith('