dsh-delete-session 0.2.6 → 0.2.7

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.
@@ -2788,4 +2788,31 @@ test('the frame sizes itself to the list', async () => {
2788
2788
  assert.equal(style.height, undefined, 'the height follows the list, not a ratio')
2789
2789
  assert.equal(style.maxHeight, '88vh', 'capped by the viewport')
2790
2790
  assert.match(String(style.minHeight), /240px/, 'and it never collapses')
2791
- })
2791
+ })
2792
+
2793
+ test('a button-shaped footer entry steps aside without hiding the bar itself', async () => {
2794
+ const harness = await loadPlugin()
2795
+ const css = String(harness.document.head.querySelector('[data-dsh-delete-session="1"]')._text ?? '')
2796
+
2797
+ // `dsh-sidebar-declutter` registers 收起面板列表 as a bare <button> in this slot,
2798
+ // with neither `data-dsh-plugin` nor an `_entryRow` wrapper, so the two attribute
2799
+ // rules above never matched it and it overlapped the bar.
2800
+ //
2801
+ // The slot has no wrapper layer: the renderer's outlet is
2802
+ // `<div data-slot style="display:contents">` and the component is its direct
2803
+ // child, which is what makes `> button` precise here.
2804
+ assert.equal(
2805
+ css.includes('body.dsdel-selecting [data-slot="sidebar.footer.action"] > button:not([role="toolbar"]){display:none}'),
2806
+ true,
2807
+ 'button-shaped entries step aside',
2808
+ )
2809
+
2810
+ // Without the `:not([role="toolbar"])` guard, any footer entry whose root is a
2811
+ // <button> would hide itself — including this plugin's own bar, which would take
2812
+ // the Cancel button with it.
2813
+ assert.doesNotMatch(
2814
+ css,
2815
+ /\[data-slot="sidebar\.footer\.action"\] > button\{display:none\}/,
2816
+ 'never hide every button unconditionally',
2817
+ )
2818
+ })