diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css index 41edcf0370..1d49839577 100644 --- a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css +++ b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css @@ -1365,8 +1365,18 @@ --dsh-button-outline-color: var(--dsw-alias-state-error-primary); } +/* The instruction only identifies the task here, so a long one stays a + three-line excerpt instead of growing the dialog. */ .confirmPrompt { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + line-clamp: 3; margin: 0; + overflow: hidden; + color: var(--dsw-alias-label-secondary); + font-size: 13px; + line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; } diff --git a/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx b/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx index e7f2ca44e4..33eb9e2628 100644 --- a/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx +++ b/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx @@ -2127,7 +2127,7 @@ describe('Task manager deletion', () => { const dialog = openDelete() const cancel = within(dialog).getByRole('button', { name: en['delete.cancel'] }) const confirm = within(dialog).getByRole('button', { name: en['delete.confirm'] }) - const content = dialog.querySelector(`.${css.confirmContent}`)! + const content = dialog.querySelector(`.${css.confirmContent}`)! expect(dialog.classList.contains(css.confirmDialog!)).toBe(true) expect(content.textContent).toContain(at.prompt) expect(content.contains(cancel)).toBe(false) @@ -2140,9 +2140,16 @@ describe('Task manager deletion', () => { // installed. The dialog's cap must follow the padding of the Modal layer // that holds it, and the scrolling content must sit inside that cap instead // of pinning a number that a wrong layer padding could not contradict. - installStyles({ confirmDialog: css.confirmDialog, confirmContent: css.confirmContent }) + installStyles({ confirmDialog: css.confirmDialog, confirmContent: css.confirmContent, confirmPrompt: css.confirmPrompt }) expect(getComputedStyle(dialog).maxHeight).toBe(`calc(100dvh - ${MODAL_LAYER_PADDING * 2}px)`) expect(getComputedStyle(content).overflowY).toBe('auto') + // The instruction is a three-line excerpt, so a long one cannot stretch the dialog. + const prompt = within(content).getByText(/^Review release/) + const clamp = getComputedStyle(prompt) + expect(clamp.display).toBe('-webkit-box') + expect(clamp.getPropertyValue('-webkit-box-orient')).toBe('vertical') + expect(clamp.overflow).toBe('hidden') + expect(clamp.getPropertyValue('-webkit-line-clamp')).toBe('3') const footer = dialog.lastElementChild as HTMLElement expect(getComputedStyle(footer).flexShrink).toBe('0') fireEvent.click(confirm)