Skip to content

Commit 9b08955

Browse files
committed
chore: update new features to v6
1 parent c2202a7 commit 9b08955

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('Test the Data view docs with tree table', () => {
33
it('displays a a components page with tree table', () => {
44
const ouiaId = 'TreeTableExample';
55

6-
cy.visit('http://localhost:8006/extensions/data-view/components');
6+
cy.visit('http://localhost:8006/extensions/data-view/table');
77

88
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).scrollIntoView().contains('Repositories');
99
cy.get(`[data-ouia-component-id="${ouiaId}-th-1"]`).contains('Branches');

packages/module/patternfly-docs/content/extensions/data-view/examples/DataView/PredefinedLayoutFullExample.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-nested-ternary */
22
import React, { useEffect, useState, useRef, useMemo } from 'react';
3-
import { Drawer, DrawerActions, DrawerCloseButton, DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, Title, Text, EmptyState, EmptyStateHeader, EmptyStateBody, EmptyStateFooter, EmptyStateActions, Button, EmptyStateIcon } from '@patternfly/react-core';
3+
import { Drawer, DrawerActions, DrawerCloseButton, DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, Title, Content, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions, Button, } from '@patternfly/react-core';
44
import { ActionsColumn, Tbody, Td, ThProps, Tr } from '@patternfly/react-table';
55
import { BulkSelect, BulkSelectValue } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect';
66
import { Pagination } from '@patternfly/react-core';
@@ -72,8 +72,7 @@ const empty = (
7272
<Tbody>
7373
<Tr key="loading" ouiaId={`${ouiaId}-tr-loading`}>
7474
<Td colSpan={COLUMNS.length}>
75-
<EmptyState>
76-
<EmptyStateHeader titleText="No data found" headingLevel="h4" icon={<EmptyStateIcon icon={CubesIcon } />} />
75+
<EmptyState headingLevel="h4" icon={CubesIcon} titleText="No data found">
7776
<EmptyStateBody>There are no matching data to be displayed.</EmptyStateBody>
7877
<EmptyStateFooter>
7978
<EmptyStateActions>
@@ -113,10 +112,10 @@ const RepositoryDetail: React.FunctionComponent<RepositoryDetailProps> = ({ sele
113112
<Title className="pf-v5-u-mb-md" headingLevel="h2" ouiaId="detail-drawer-title">
114113
Detail of {selectedRepo?.name}
115114
</Title>
116-
<Text>Branch: {selectedRepo?.branch}</Text>
117-
<Text>Pull requests: {selectedRepo?.prs}</Text>
118-
<Text>Workspace: {selectedRepo?.workspace}</Text>
119-
<Text>Last commit: {selectedRepo?.lastCommit}</Text>
115+
<Content component="p">Branch: {selectedRepo?.branch}</Content>
116+
<Content component="p">Pull requests: {selectedRepo?.prs}</Content>
117+
<Content component="p">Workspace: {selectedRepo?.workspace}</Content>
118+
<Content component="p">Last commit: {selectedRepo?.lastCommit}</Content>
120119
<DrawerActions>
121120
<DrawerCloseButton onClick={() => setSelectedRepo(undefined)} data-ouia-component-id="detail-drawer-close-btn"/>
122121
</DrawerActions>

packages/module/patternfly-docs/content/extensions/data-view/examples/Table/Table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sourceLink: https://github.com/patternfly/react-data-view/blob/main/packages/mod
1717
---
1818
import { useMemo } from 'react';
1919
import { BrowserRouter, useSearchParams } from 'react-router-dom';
20-
import { Button, EmptyState, EmptyStateActions, EmptyStateBody, EmptyStateFooter, EmptyStateHeader, EmptyStateIcon } from '@patternfly/react-core';
20+
import { Button, EmptyState, EmptyStateActions, EmptyStateBody, EmptyStateFooter } from '@patternfly/react-core';
2121
import { CubesIcon, FolderIcon, FolderOpenIcon, LeafIcon, ExclamationCircleIcon } from '@patternfly/react-icons';
2222
import { ErrorState, ResponsiveAction, ResponsiveActions, SkeletonTableHead, SkeletonTableBody } from '@patternfly/react-component-groups';
2323
import { DataViewToolbar } from '@patternfly/react-data-view/dist/dynamic/DataViewToolbar';

packages/module/src/DataViewToolbar/DataViewToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const DataViewToolbar: React.FC<DataViewToolbarProps> = ({ className, oui
4141
</ToolbarItem>
4242
)}
4343
{actions && (
44-
<ToolbarItem variant={ToolbarItemVariant['overflow-menu']}>
44+
<ToolbarItem>
4545
{actions}
4646
</ToolbarItem>
4747
)}

0 commit comments

Comments
 (0)