diff --git a/src/components/ArtifactsList/ArtifactsList.tsx b/src/components/ArtifactsList/ArtifactsList.tsx index 966952f1..226c5323 100644 --- a/src/components/ArtifactsList/ArtifactsList.tsx +++ b/src/components/ArtifactsList/ArtifactsList.tsx @@ -36,6 +36,7 @@ import { ParsedArtifactIdentifier } from 'components/ParsedArtifactIdentifier/Pa import { ServiceContainerLoading } from 'components/ServiceContainers/ServiceContainerLoading'; import { Toolbar } from 'components/Toolbar/Toolbar'; import { ToolbarItem } from 'components/Toolbar/ToolbarItem'; +import { ToolbarRow } from 'components/Toolbar/ToolbarRow'; import { TooltipWrapper } from 'components/TooltipWrapper/TooltipWrapper'; import { isArtifactWithProductMilestone } from 'utils/entityRecognition'; @@ -119,54 +120,55 @@ export const ArtifactsList = ({ serviceContainerArtifacts, columns = defaultColu return ( <> - - - getFilterOptions({ - entityAttributes: artifactEntityAttributes, - defaultFiltering: { attribute: artifactEntityAttributes.identifier.id }, - customColumns: columns, - }), - [columns] - )} - componentId={componentId} - onFilter={(filterAttribute: TFilterAttribute, _) => { - if ( - [artifactEntityAttributes.md5.id, artifactEntityAttributes.sha1.id, artifactEntityAttributes.sha256.id].some( - (hash) => hash === filterAttribute.id - ) - ) { - setAreBuildArtifactsExpanded(false); - setAreAllArtifactsExpanded(true); - } - }} - /> - - - - - - { - storeIsArtifactIdentifierParsed(checked); - }} - /> - - - { - setAreBuildArtifactsExpanded(!areBuildArtifactsExpanded); - setAreAllArtifactsExpanded(areBuildArtifactsExpanded ? false : undefined); - }} - /> - + + + + getFilterOptions({ + entityAttributes: artifactEntityAttributes, + defaultFiltering: { attribute: artifactEntityAttributes.identifier.id }, + customColumns: columns, + }), + [columns] + )} + componentId={componentId} + onFilter={(filterAttribute: TFilterAttribute, _) => { + if ( + [artifactEntityAttributes.md5.id, artifactEntityAttributes.sha1.id, artifactEntityAttributes.sha256.id].some( + (hash) => hash === filterAttribute.id + ) + ) { + setAreBuildArtifactsExpanded(false); + setAreAllArtifactsExpanded(true); + } + }} + /> + + + + + { + storeIsArtifactIdentifierParsed(checked); + }} + /> + + + { + setAreBuildArtifactsExpanded(!areBuildArtifactsExpanded); + setAreAllArtifactsExpanded(areBuildArtifactsExpanded ? false : undefined); + }} + /> + + diff --git a/src/components/ArtifactsPage/__tests__/__snapshots__/ArtifactsPage.test.tsx.snap b/src/components/ArtifactsPage/__tests__/__snapshots__/ArtifactsPage.test.tsx.snap index 69d647ec..263f9826 100644 --- a/src/components/ArtifactsPage/__tests__/__snapshots__/ArtifactsPage.test.tsx.snap +++ b/src/components/ArtifactsPage/__tests__/__snapshots__/ArtifactsPage.test.tsx.snap @@ -87,159 +87,153 @@ Object { class="" >
- + +
-
-
- - - + + + +
- - - -
-
-
- -
-
- +
+
- - - - - + + + + + +
@@ -1104,159 +1098,153 @@ Object { class="" >
- + +
-
-
- - - + + + +
- - - -
-
-
- -
-
- +
+
- - - - - + + + + + +
diff --git a/src/components/BuildsList/BuildsList.tsx b/src/components/BuildsList/BuildsList.tsx index 34628797..35012f86 100644 --- a/src/components/BuildsList/BuildsList.tsx +++ b/src/components/BuildsList/BuildsList.tsx @@ -29,6 +29,7 @@ import { ServiceContainerLoading } from 'components/ServiceContainers/ServiceCon import { SortGroup } from 'components/SortGroup/SortGroup'; import { Toolbar } from 'components/Toolbar/Toolbar'; import { ToolbarItem } from 'components/Toolbar/ToolbarItem'; +import { ToolbarRow } from 'components/Toolbar/ToolbarRow'; import { TooltipWrapper } from 'components/TooltipWrapper/TooltipWrapper'; import { Username } from 'components/Username/Username'; @@ -160,35 +161,36 @@ export const BuildsList = ({ serviceContainerBuilds, columns = defaultColumns, c return ( <> - - - getFilterOptions({ - entityAttributes: buildEntityAttributes, - defaultFiltering: { attribute: buildEntityAttributes.status.id }, - customColumns: columns, - }), - [columns] - )} - componentId={componentId} - /> - - - - - - - { - storeIsCompactMode(checked); - }} + + + + getFilterOptions({ + entityAttributes: buildEntityAttributes, + defaultFiltering: { attribute: buildEntityAttributes.status.id }, + customColumns: columns, + }), + [columns] + )} + componentId={componentId} /> - - + + + + + + { + storeIsCompactMode(checked); + }} + /> + + + diff --git a/src/components/BuildsPage/__tests__/__snapshots__/BuildsPage.test.tsx.snap b/src/components/BuildsPage/__tests__/__snapshots__/BuildsPage.test.tsx.snap index 03bf5974..dace18ff 100644 --- a/src/components/BuildsPage/__tests__/__snapshots__/BuildsPage.test.tsx.snap +++ b/src/components/BuildsPage/__tests__/__snapshots__/BuildsPage.test.tsx.snap @@ -45,150 +45,144 @@ Object { class="" >
- + +
-
-
- + +
- - - -
-
-
- - + + + + + +
@@ -1035,150 +1029,144 @@ Object { class="" >
- + +
-
-
- + +
- - - -
-
-
- - + + + + + +
diff --git a/src/components/GroupConfigsPage/__tests__/__snapshots__/GroupConfigsPage.test.tsx.snap b/src/components/GroupConfigsPage/__tests__/__snapshots__/GroupConfigsPage.test.tsx.snap index a6c4e201..098ae34b 100644 --- a/src/components/GroupConfigsPage/__tests__/__snapshots__/GroupConfigsPage.test.tsx.snap +++ b/src/components/GroupConfigsPage/__tests__/__snapshots__/GroupConfigsPage.test.tsx.snap @@ -67,8 +67,7 @@ Object { class="" >
- + {children} diff --git a/src/components/Toolbar/ToolbarRow.tsx b/src/components/Toolbar/ToolbarRow.tsx new file mode 100644 index 00000000..a73e6c45 --- /dev/null +++ b/src/components/Toolbar/ToolbarRow.tsx @@ -0,0 +1,11 @@ +import { Flex, FlexProps } from '@patternfly/react-core'; + +import styles from './Toolbar.module.css'; + +const spaceItemsNone: FlexProps['spaceItems'] = { default: 'spaceItemsNone' }; + +export const ToolbarRow = ({ children }: React.PropsWithChildren<{}>) => ( + + {children} + +);