From 44ba240a675496ba7bffcfb26a47be509f56e529 Mon Sep 17 00:00:00 2001 From: Divyanshu Gupta Date: Tue, 14 Oct 2025 20:19:26 +0530 Subject: [PATCH 1/2] chore(miscellaneous): update demo flags from js to ts --- packages/react-core/src/demos/AlertGroup.md | 2 +- packages/react-core/src/demos/BackToTop.md | 2 +- .../react-core/src/demos/CardView/CardView.md | 2 +- packages/react-core/src/demos/DataListDemo.md | 8 ++++---- .../demos/DescriptionList/DescriptionList.md | 4 ++-- packages/react-core/src/demos/Nav.md | 18 +++++++++--------- packages/react-core/src/demos/PrimaryDetail.md | 12 ++++++------ packages/react-core/src/demos/RTL/RTL.md | 2 +- packages/react-core/src/demos/Toolbar.md | 2 +- packages/react-table/src/demos/Table.md | 16 ++++++++-------- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/packages/react-core/src/demos/AlertGroup.md b/packages/react-core/src/demos/AlertGroup.md index 9099b7a64fb..8961240fcbe 100644 --- a/packages/react-core/src/demos/AlertGroup.md +++ b/packages/react-core/src/demos/AlertGroup.md @@ -15,6 +15,6 @@ This demonstrates how you can assemble a full page view including the use of ale ### Alert group toast with notification drawer -```js file='./examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx' isFullscreen +```ts file="examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/BackToTop.md b/packages/react-core/src/demos/BackToTop.md index f1b362c9d00..195bc0dd56b 100644 --- a/packages/react-core/src/demos/BackToTop.md +++ b/packages/react-core/src/demos/BackToTop.md @@ -11,5 +11,5 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard Note that `tabIndex={0}` is added to the scrolling `PageSection` of the page to allow keyboard users the ability to focus and scroll. -```js isFullscreen file="./examples/BackToTop/BackToTopNameDemo.tsx" +```ts file="examples/BackToTop/BackToTopNameDemo.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/CardView/CardView.md b/packages/react-core/src/demos/CardView/CardView.md index 42d0121f6cc..eb07d11f1c5 100644 --- a/packages/react-core/src/demos/CardView/CardView.md +++ b/packages/react-core/src/demos/CardView/CardView.md @@ -27,5 +27,5 @@ This demonstrates how you can assemble a full page view that contains a grid of ### Card view -```js file="./examples/CardView.tsx" isFullscreen +```ts file="examples/CardView.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/DataListDemo.md b/packages/react-core/src/demos/DataListDemo.md index d7b9ba6cff7..e44f0751e18 100644 --- a/packages/react-core/src/demos/DataListDemo.md +++ b/packages/react-core/src/demos/DataListDemo.md @@ -23,24 +23,24 @@ import { rows } from '@patternfly/react-core/dist/esm/demos/sampleData'; ### Basic -```js file="./DataList/examples/DataListBasic.tsx" isFullscreen +```ts file="DataList/examples/DataListBasic.tsx" isFullscreen ``` ### Expandable control in toolbar -```js file="./DataList/examples/DataListExpandableControlInToolbar.tsx" isFullscreen +```ts file="DataList/examples/DataListExpandableControlInToolbar.tsx" isFullscreen ``` ### Actionable -```js file="./DataList/examples/DataListActionable.tsx" isFullscreen +```ts file="DataList/examples/DataListActionable.tsx" isFullscreen ``` ### Static bottom pagination -```js file="./DataList/examples/DataListStaticBottomPagination.tsx" isFullscreen +```ts file="DataList/examples/DataListStaticBottomPagination.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/DescriptionList/DescriptionList.md b/packages/react-core/src/demos/DescriptionList/DescriptionList.md index 5d7c75ec2a6..39a137f950d 100644 --- a/packages/react-core/src/demos/DescriptionList/DescriptionList.md +++ b/packages/react-core/src/demos/DescriptionList/DescriptionList.md @@ -12,10 +12,10 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard ### Basic -```js file='./examples/DescriptionListBasic.tsx' isFullscreen +```ts file="examples/DescriptionListBasic.tsx" isFullscreen ``` ### In drawer -```js file='./examples/DescriptionListInDrawer.tsx' isFullscreen +```ts file="examples/DescriptionListInDrawer.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/Nav.md b/packages/react-core/src/demos/Nav.md index 8e9ff804270..21469660acd 100644 --- a/packages/react-core/src/demos/Nav.md +++ b/packages/react-core/src/demos/Nav.md @@ -19,45 +19,45 @@ import { DashboardHeader } from '@patternfly/react-core/dist/js/demos/DashboardH ### Default nav -```js file='./examples/Nav/NavDefault.tsx' isFullscreen +```ts file="./examples/Nav/NavDefault.tsx" isFullscreen ``` ### Grouped nav -```js file='./examples/Nav/NavGrouped.tsx' isFullscreen +```ts file="./examples/Nav/NavGrouped.tsx" isFullscreen ``` ### Expandable nav -```js file='./examples/Nav/NavExpandable.tsx' isFullscreen +```ts file="./examples/Nav/NavExpandable.tsx" isFullscreen ``` ### Horizontal nav -```js file='./examples/Nav/NavHorizontal.tsx' isFullscreen +```ts file="./examples/Nav/NavHorizontal.tsx" isFullscreen ``` ### Horizontal subnav -```js file='./examples/Nav/NavWithSubnav.tsx' isFullscreen +```ts file="./examples/Nav/NavWithSubnav.tsx" isFullscreen ``` ### Horizontal nav with horizontal subnav -```js file='./examples/Nav/NavHorizontalWithSubnav.tsx' isFullscreen +```ts file="./examples/Nav/NavHorizontalWithSubnav.tsx" isFullscreen ``` ### Manual nav -```js file='./examples/Nav/NavManual.tsx' isFullscreen +```ts file="./examples/Nav/NavManual.tsx" isFullscreen ``` ### Flyout nav -```js file='./examples/Nav/NavFlyout.tsx' isFullscreen +```ts file="./examples/Nav/NavFlyout.tsx" isFullscreen ``` ### Drilldown nav -```js isFullscreen file="./examples/Nav/NavDrilldown.tsx" +```ts isFullscreen file="./examples/Nav/NavDrilldown.tsx" ``` diff --git a/packages/react-core/src/demos/PrimaryDetail.md b/packages/react-core/src/demos/PrimaryDetail.md index a3040769493..b7a17b9839c 100644 --- a/packages/react-core/src/demos/PrimaryDetail.md +++ b/packages/react-core/src/demos/PrimaryDetail.md @@ -31,32 +31,32 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard ### Primary-detail full page -```js file="./examples/PrimaryDetail/PrimaryDetailFullPage.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailFullPage.tsx" isFullscreen ``` ### Primary-detail content padding -```js file="./examples/PrimaryDetail/PrimaryDetailContentPadding.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailContentPadding.tsx" isFullscreen ``` ### Primary-detail card view -```js file="./examples/PrimaryDetail/PrimaryDetailCardView.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailCardView.tsx" isFullscreen ``` ### Primary-detail simple list in card -```js file="./examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx" isFullscreen ``` ### Primary-detail data list in card -```js file="./examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx" isFullscreen ``` ### Primary-detail inline modifier -```js file="./examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx" isFullscreen +```ts file="examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/RTL/RTL.md b/packages/react-core/src/demos/RTL/RTL.md index 7a989a3cacc..37ddab0563d 100644 --- a/packages/react-core/src/demos/RTL/RTL.md +++ b/packages/react-core/src/demos/RTL/RTL.md @@ -28,6 +28,6 @@ This demonstrates how the UI adapts to the writing mode of the page. ### Paginated table -```js file="./examples/PaginatedTable.tsx" isFullscreen +```ts file="examples/PaginatedTable.tsx" isFullscreen ``` diff --git a/packages/react-core/src/demos/Toolbar.md b/packages/react-core/src/demos/Toolbar.md index 2ab2ced8931..19560201610 100644 --- a/packages/react-core/src/demos/Toolbar.md +++ b/packages/react-core/src/demos/Toolbar.md @@ -20,5 +20,5 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard This is an example of toolbar usage in log viewer. -```js file="./examples/Toolbar/ConsoleLogViewerToolbar.tsx" isFullscreen +```ts file="examples/Toolbar/ConsoleLogViewerToolbar.tsx" isFullscreen ``` diff --git a/packages/react-table/src/demos/Table.md b/packages/react-table/src/demos/Table.md index 6f37d98b825..19e9f396bc9 100644 --- a/packages/react-table/src/demos/Table.md +++ b/packages/react-table/src/demos/Table.md @@ -77,49 +77,49 @@ import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; ### Bulk select -```js isFullscreen file="./examples/TableBulkSelect.tsx" +```ts isFullscreen file="examples/TableBulkSelect.tsx" ``` ### Expand/collapse all -```js isFullscreen file="./examples/TableExpandCollapseAll.tsx" +```ts isFullscreen file="examples/TableExpandCollapseAll.tsx" ``` ### Compact -```js isFullscreen file="./examples/TableCompact.tsx" +```ts isFullscreen file="examples/TableCompact.tsx" ``` ### Compound expansion -```js isFullscreen file="./examples/TableCompoundExpansion.tsx" +```ts isFullscreen file="examples/TableCompoundExpansion.tsx" ``` ### Column management -```js isFullscreen file="./examples/TableColumnManagement.tsx" +```ts isFullscreen file="examples/TableColumnManagement.tsx" ``` ### Column management with draggable -```js isFullscreen file="./examples/TableColumnManagementWithDraggable.tsx" +```ts isFullscreen file="examples/TableColumnManagementWithDraggable.tsx" ``` ### Filterable -```js isFullscreen file="./examples/TableFilterable.tsx" +```ts isFullscreen file="examples/TableFilterable.tsx" ``` ### Sortable - responsive -```js isFullscreen file="./examples/TableSortableResponsive.tsx" +```ts isFullscreen file="examples/TableSortableResponsive.tsx" ``` From 24cea9a66c082616936d72fbe8d9680559d3b363 Mon Sep 17 00:00:00 2001 From: Divyanshu Gupta Date: Tue, 21 Oct 2025 19:37:37 +0530 Subject: [PATCH 2/2] add type to backtotop demo --- .../src/demos/examples/BackToTop/BackToTopNameDemo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx b/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx index f8467925d03..473cb7cd286 100644 --- a/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +++ b/packages/react-core/src/demos/examples/BackToTop/BackToTopNameDemo.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { BackToTop, Card, CardBody, Content, Gallery, GalleryItem, PageSection, Switch } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; -export const Name = () => { +export const BacktoTopNameDemo: React.FunctionComponent = () => { const [isAlwaysVisible, setIsAlwaysVisible] = useState(false); const handleChange = (_event, isChecked) => {