From 6ecc5eed827618384ffaf0a745aa2d9a70992628 Mon Sep 17 00:00:00 2001 From: tusmester Date: Thu, 14 Sep 2023 15:15:45 +0200 Subject: [PATCH 1/2] Display batch ops after the first selection. (#1526) --- .../sensenet/cypress/e2e/ui/batchOperations.cy.ts | 15 ++++++++++++--- .../src/components/ContentBreadcrumbs.tsx | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/sensenet/cypress/e2e/ui/batchOperations.cy.ts b/apps/sensenet/cypress/e2e/ui/batchOperations.cy.ts index 63f916ac3..23bbb2c9d 100644 --- a/apps/sensenet/cypress/e2e/ui/batchOperations.cy.ts +++ b/apps/sensenet/cypress/e2e/ui/batchOperations.cy.ts @@ -7,6 +7,17 @@ describe('Batch operations: ', () => { cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) }) + it('batch actions should appear when at least a single item is selected', () => { + cy.visit( + pathWithQueryParams({ + path: resolvePathParams({ path: PATHS.content.appPath, params: { browseType: 'explorer' } }), + newParams: { repoUrl: Cypress.env('repoUrl'), path: '/SampleWorkspace/Document_Library' }, + }), + ) + cy.get('[data-test="table-row-selection-control-dinnerscookbook.pdf"]').click({ force: true }) + cy.get('[data-test="batch-actions"]').should('exist') + }) + it('multiple content copy works as it is intended', () => { cy.visit( pathWithQueryParams({ @@ -74,9 +85,7 @@ describe('Batch operations: ', () => { //put it back cy.get('[data-test="table-row-selection-control-dinnerscookbook.pdf"]').click({ force: true }) - cy.get('[data-test="table-row-selection-control-hello_world.docx"]') - .find('input[type="checkbox"]') - .check({ force: true }) + cy.get('[data-test="table-row-selection-control-hello_world.docx"]').click({ force: true }) cy.get('[data-test="batch-move"]').click() cy.get('[data-test="picker-up"]').dblclick() cy.get('[data-test="picker-submit"]').click() diff --git a/apps/sensenet/src/components/ContentBreadcrumbs.tsx b/apps/sensenet/src/components/ContentBreadcrumbs.tsx index 22e38b368..f07f13317 100644 --- a/apps/sensenet/src/components/ContentBreadcrumbs.tsx +++ b/apps/sensenet/src/components/ContentBreadcrumbs.tsx @@ -78,8 +78,8 @@ export const ContentBreadcrumbs = (pr : history.push(getPrimaryActionUrl({ content: item.content, repository, uiSettings, location })) }} /> - {props.batchActions && selected.length > 1 ? ( -
+ {props.batchActions && selected.length > 0 ? ( +
Date: Mon, 18 Sep 2023 09:47:25 +0200 Subject: [PATCH 2/2] Columsettings button's tooltip in the grid header. (#1528) --- .../src/ContentList/virtualized-table.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/sn-list-controls-react/src/ContentList/virtualized-table.tsx b/packages/sn-list-controls-react/src/ContentList/virtualized-table.tsx index f4d458ce6..282ab0ed8 100644 --- a/packages/sn-list-controls-react/src/ContentList/virtualized-table.tsx +++ b/packages/sn-list-controls-react/src/ContentList/virtualized-table.tsx @@ -275,9 +275,11 @@ export const VirtualizedTable = (prop alignItems: 'center', }} component="div"> - + + + ) }