style(client): refine drag insertion markers

This commit is contained in:
_Kerman
2026-08-11 15:42:44 +08:00
parent 3f09330f4b
commit d672eace2f
5 changed files with 62 additions and 14 deletions
@@ -48,9 +48,13 @@ describe('WorkspaceBrowser.module.css list', () => {
expect(root?.get('--dsh-session-list-scrollbar-width')).toBe('8px')
expect(root?.get('--dsh-session-list-scrollbar-offset')).toBe('2px')
expect(root?.get('padding-right')).toBe('var(--dsh-session-list-edge-inset)')
expect(listArea?.get('margin-left')).toBe('-4px')
expect(listArea?.get('padding-left')).toBe('4px')
expect(listArea?.get('margin-right')).toBe('calc(-1 * var(--dsh-session-list-edge-inset))')
expect(declarations('.fade')?.get('right')).toBe('var(--dsh-session-list-edge-inset)')
expect(list?.get('margin-right')).toBe('var(--dsh-session-list-scrollbar-offset)')
expect(list?.get('margin-left')).toBe('-4px')
expect(list?.get('padding-left')).toBe('4px')
expect(list?.get('padding-right')).toBe([
'calc(',
'var(--dsh-session-list-edge-inset)',
@@ -72,6 +76,20 @@ describe('WorkspaceBrowser.module.css list', () => {
expect(declarations('.groupSection + .groupSection')?.get('margin-top')).toBe('4px')
})
it('draws drag targets as a hollow leading dot joined to the insertion line', () => {
const workspaceMarker = declarations('.workspaceDropBefore::before')
const sessionMarker = rowDeclarations('.sessionRow.dropBefore::before')
expect(workspaceMarker?.get('left')).toBe('-4px')
expect(sessionMarker?.get('left')).toBe('0')
for (const marker of [workspaceMarker, sessionMarker]) {
expect(marker?.get('height')).toBe('12px')
expect(marker?.get('background')).toContain('radial-gradient')
expect(marker?.get('background')).toContain('linear-gradient')
expect(marker?.get('background')).toContain('var(--dsw-alias-state-business-primary) 3px 5px')
expect(marker?.get('background')).toContain('10px 5px / calc(100% - 10px) 2px')
}
})
it('keeps the compact fade, overflow control, search field, and row heights', () => {
expect(declarations('.fade')?.get('height')).toBe('24px')
expect(declarations('.sessionOverflowButton')?.get('height')).toBe('28px')