diff --git a/lib/components/WorkPackage/OptionsPopover.tsx b/lib/components/WorkPackage/OptionsPopover.tsx index 248fd9a..71cb114 100644 --- a/lib/components/WorkPackage/OptionsPopover.tsx +++ b/lib/components/WorkPackage/OptionsPopover.tsx @@ -8,7 +8,6 @@ import { defaultWpVariables } from "./atoms"; import { LinkExternalIcon, TrashIcon, - ScreenFullIcon, ChevronDownIcon, } from "@primer/octicons-react"; @@ -26,7 +25,7 @@ export interface WpOptionsProps { } const INLINE_SIZE_OPTIONS: InlineWpSize[] = ["xxs", "xs", "s"]; -const BLOCK_SIZE_OPTIONS: BlockWpSize[] = ["m", "l", "xl"]; +const BLOCK_SIZE_OPTIONS: BlockWpSize[] = ["m"]; export const WpOptionsPopover = ({ wp, @@ -78,7 +77,6 @@ export const WpOptionsPopover = ({ setShowSizes((prev) => !prev); }} > - {displayedSize} @@ -271,5 +269,4 @@ const SizeBtnDesc = styled.span` const IcOpen = () => ; const IcDelete = () => ; -const IcSize = () => ; const IcChevron = () => ; \ No newline at end of file diff --git a/lib/locales/en.ts b/lib/locales/en.ts index ae343e8..a921ebc 100644 --- a/lib/locales/en.ts +++ b/lib/locales/en.ts @@ -41,12 +41,12 @@ export const en = { "chipAriaLabel": "Work package #{{id}}", }, "sizes": { - "xxs": { "label": "Tiny (inline)", "desc": "Identifier" }, - "xs": { "label": "Compact (inline)", "desc": "Type, Identifier, Subject" }, - "s": { "label": "Regular (inline)", "desc": "Status, Type, Identifier, Subject" }, - "m": { "label": "Compact card", "desc": "Compact card - Status, Type, Identifier, Subject" }, - "l": { "label": "Regular card", "desc": "Regular card - Identifier, Subject, Type, Status, Parent, Project" }, - "xl": { "label": "Full card", "desc": "Full card - Identifier, Subject, Type, Status, Parent, Project, Description" } + "xxs": { "label": "Tiny", "desc": "Identifier" }, + "xs": { "label": "Compact", "desc": "Type, Identifier, Subject" }, + "s": { "label": "Regular", "desc": "Status, Type, Identifier, Subject" }, + "m": { "label": "Compact card", "desc": "Status, Type, Identifier, Subject" }, + "l": { "label": "Regular card", "desc": "Identifier, Subject, Type, Status, Parent, Project" }, + "xl": { "label": "Full card", "desc": "Identifier, Subject, Type, Status, Parent, Project, Description" } }, "hashMenu": { "typeToSearch": "Type to search work packages…", diff --git a/test/lib/components/integration/editor.blockCard.browser.test.tsx b/test/lib/components/integration/editor.blockCard.browser.test.tsx index 96b4680..426310f 100644 --- a/test/lib/components/integration/editor.blockCard.browser.test.tsx +++ b/test/lib/components/integration/editor.blockCard.browser.test.tsx @@ -9,34 +9,34 @@ import { } from '../../../helpers/editorHelpers'; describe('Block card - resize', () => { - it('Compact card -> Regular card: both show title and status', async () => { - renderEditor(); - await insertInlineChipViaSlashMenu(); - await convertToCompactCard(); + // it('Compact card -> Regular card: both show title and status', async () => { + // renderEditor(); + // await insertInlineChipViaSlashMenu(); + // await convertToCompactCard(); - await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); + // await openBlockCardSizeMenu(); + // await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); - await expect.element(page.getByTestId('block-card')).toBeVisible(); - await expect.element(page.getByText('Fix login bug')).toBeVisible(); - await expect.element(page.getByText('In Progress')).toBeVisible(); - }); + // await expect.element(page.getByTestId('block-card')).toBeVisible(); + // await expect.element(page.getByText('Fix login bug')).toBeVisible(); + // await expect.element(page.getByText('In Progress')).toBeVisible(); + // }); - it('Regular card -> Full card shows extended content', async () => { - renderEditor(); - await insertInlineChipViaSlashMenu(); + // it('Regular card -> Full card shows extended content', async () => { + // renderEditor(); + // await insertInlineChipViaSlashMenu(); - await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); - await expect.element(page.getByTestId('block-card')).toBeVisible(); + // await openBlockCardSizeMenu(); + // await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); + // await expect.element(page.getByTestId('block-card')).toBeVisible(); - await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Full card', exact: true })); + // await openBlockCardSizeMenu(); + // await userEvent.click(page.getByRole('button', { name: 'Full card', exact: true })); - await expect.element(page.getByTestId('block-card')).toBeVisible(); - await expect.element(page.getByText('Fix login bug')).toBeVisible(); - await expect.element(page.getByText('In Progress')).toBeVisible(); - }); + // await expect.element(page.getByTestId('block-card')).toBeVisible(); + // await expect.element(page.getByText('Fix login bug')).toBeVisible(); + // await expect.element(page.getByText('In Progress')).toBeVisible(); + // }); it('size button label reflects current card size', async () => { renderEditor(); @@ -47,7 +47,7 @@ describe('Block card - resize', () => { await expect.element(page.getByTitle('Change size')).toHaveTextContent('Compact card'); }); - it('size menu shows all 6 options for a block card', async () => { + it('size menu shows all 4 options for a block card', async () => { renderEditor(); await insertInlineChipViaSlashMenu(); await convertToCompactCard(); @@ -55,12 +55,10 @@ describe('Block card - resize', () => { await openBlockCardSizeMenu(); for (const label of [ - 'Tiny (inline)', - 'Compact (inline)', - 'Regular (inline)', + 'Tiny', + 'Compact', + 'Regular', 'Compact card', - 'Regular card', - 'Full card', ]) { await expect.element(page.getByRole('button', { name: label, exact: true })).toBeVisible(); } @@ -72,7 +70,7 @@ describe('Block card - resize', () => { await convertToCompactCard(); await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Compact card', exact: true })); await expect.element(page.getByTestId('size-menu')).not.toBeInTheDocument(); }); diff --git a/test/lib/components/integration/editor.conversion.browser.test.tsx b/test/lib/components/integration/editor.conversion.browser.test.tsx index e15e031..158d890 100644 --- a/test/lib/components/integration/editor.conversion.browser.test.tsx +++ b/test/lib/components/integration/editor.conversion.browser.test.tsx @@ -22,17 +22,17 @@ describe('Inline chip - convert to block card', () => { await expect.element(page.getByTestId('op-bn-work-package--type')).toBeVisible(); }); - it('inline → Regular card replaces chip with block card', async () => { - renderEditor(); - await insertInlineChipViaSlashMenu(); + // it('inline → Regular card replaces chip with block card', async () => { + // renderEditor(); + // await insertInlineChipViaSlashMenu(); - await openInlineChipSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); + // await openInlineChipSizeMenu(); + // await userEvent.click(page.getByRole('button', { name: 'Regular card', exact: true })); - await expect.element(page.getByTestId('block-card')).toBeVisible(); - await expect.element(page.getByText('Fix login bug')).toBeVisible(); - await expect.element(page.getByText('In Progress')).toBeVisible(); - }); + // await expect.element(page.getByTestId('block-card')).toBeVisible(); + // await expect.element(page.getByText('Fix login bug')).toBeVisible(); + // await expect.element(page.getByText('In Progress')).toBeVisible(); + // }); }); describe('Block card - convert to inline chip', () => { @@ -42,7 +42,7 @@ describe('Block card - convert to inline chip', () => { await convertToCompactCard(); await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Tiny (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Tiny', exact: true })); await expect.element(page.getByTestId('block-card')).not.toBeInTheDocument(); await expect.element(page.getByText('#123')).toBeVisible(); @@ -56,7 +56,7 @@ describe('Block card - convert to inline chip', () => { await convertToCompactCard(); await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Compact (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Compact', exact: true })); await expect.element(page.getByTestId('block-card')).not.toBeInTheDocument(); await expect.element(page.getByText('#123')).toBeVisible(); @@ -71,7 +71,7 @@ describe('Block card - convert to inline chip', () => { await convertToCompactCard(); await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Regular', exact: true })); await expect.element(page.getByTestId('block-card')).not.toBeInTheDocument(); await expect.element(page.getByText('#123')).toBeVisible(); @@ -90,7 +90,7 @@ describe('Round-trip conversion', () => { // back to inline S await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Regular', exact: true })); await expect.element(page.getByTestId('block-card')).not.toBeInTheDocument(); await expect.element(page.getByText('#123')).toBeVisible(); @@ -109,7 +109,7 @@ describe('Round-trip conversion', () => { // back to XXS inline await openBlockCardSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Tiny (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Tiny', exact: true })); await expect.element(page.getByTestId('block-card')).not.toBeInTheDocument(); await expect.element(page.getByText('#123')).toBeVisible(); diff --git a/test/lib/components/integration/editor.inlineChip.browser.test.tsx b/test/lib/components/integration/editor.inlineChip.browser.test.tsx index fbab81f..578ec21 100644 --- a/test/lib/components/integration/editor.inlineChip.browser.test.tsx +++ b/test/lib/components/integration/editor.inlineChip.browser.test.tsx @@ -53,7 +53,7 @@ describe('Inline chip - resize', () => { await insertInlineChipViaSlashMenu(); await openInlineChipSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Tiny (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Tiny', exact: true })); await expect.element(page.getByText('#123')).toBeVisible(); await expect.element(page.getByTestId('op-bn-work-package--type')).not.toBeInTheDocument(); @@ -66,7 +66,7 @@ describe('Inline chip - resize', () => { await insertInlineChipViaSlashMenu(); await openInlineChipSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Compact (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Compact', exact: true })); await expect.element(page.getByText('#123')).toBeVisible(); await expect.element(page.getByTestId('op-bn-work-package--type')).toBeVisible(); @@ -79,7 +79,7 @@ describe('Inline chip - resize', () => { await insertInlineChipViaHash('##'); await openInlineChipSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Tiny (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Tiny', exact: true })); await expect.element(page.getByText('#123')).toBeVisible(); await expect.element(page.getByTestId('op-bn-work-package--type')).not.toBeInTheDocument(); diff --git a/test/lib/components/integration/wpOptionsPopover.browser.test.tsx b/test/lib/components/integration/wpOptionsPopover.browser.test.tsx index 16d7846..ddf7b0b 100644 --- a/test/lib/components/integration/wpOptionsPopover.browser.test.tsx +++ b/test/lib/components/integration/wpOptionsPopover.browser.test.tsx @@ -58,7 +58,7 @@ describe('Inline chip size transitions (user-visible content)', () => { await expect.element(page.getByText('In Progress')).not.toBeInTheDocument(); await openSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Compact (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Compact', exact: true })); await expect.element(page.getByTestId('op-bn-work-package--type')).toBeVisible(); await expect.element(page.getByText('Fix login bug')).toBeVisible(); @@ -72,7 +72,7 @@ describe('Inline chip size transitions (user-visible content)', () => { await expect.element(page.getByText('In Progress')).not.toBeInTheDocument(); await openSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Regular (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Regular', exact: true })); await expect.element(page.getByText('In Progress')).toBeVisible(); }); @@ -86,7 +86,7 @@ describe('Inline chip size transitions (user-visible content)', () => { await expect.element(page.getByText('Fix login bug')).toBeVisible(); await openSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Tiny (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Tiny', exact: true })); await expect.element(page.getByText('#123')).toBeVisible(); await expect.element(page.getByTestId('op-bn-work-package--type')).not.toBeInTheDocument(); @@ -183,7 +183,7 @@ describe('Inline chip popover UX', () => { render(); await waitForResolvedChip(); await openSizeMenu(); - await userEvent.click(page.getByRole('button', { name: 'Compact (inline)', exact: true })); + await userEvent.click(page.getByRole('button', { name: 'Compact', exact: true })); await expect.element(page.getByTestId('size-menu')).not.toBeInTheDocument(); }); @@ -191,7 +191,7 @@ describe('Inline chip popover UX', () => { render(); await waitForResolvedChip(); await openPopover(); - await expect.element(page.getByTitle('Change size')).toHaveTextContent('Regular (inline)'); + await expect.element(page.getByTitle('Change size')).toHaveTextContent('Regular'); }); it('inline size menu shows all 6 options', async () => { @@ -200,12 +200,10 @@ describe('Inline chip popover UX', () => { await openSizeMenu(); for (const label of [ - 'Tiny (inline)', - 'Compact (inline)', - 'Regular (inline)', + 'Tiny', + 'Compact', + 'Regular', 'Compact card', - 'Regular card', - 'Full card', ]) { await expect.element(page.getByRole('button', { name: label, exact: true })).toBeVisible(); }