Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(demo): Update demo to show a better example #154

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/demo-app-ts/src/Demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
--pf-v5-l-flex--FlexWrap: no-wrap;
}
.pf-ri__topology-demo .pf-v5-c-toolbar__item .pf-v5-c-form-control {
width: 85px;
width: 70px;
}
.pf-ri-topology-context-menu {
z-index: 1050;
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-app-ts/src/Demos.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { TopologyPipelineDemo } from './demos/TopologyPipelineDemo';
import { TopologyPipelineDemo } from './demos/pipelinesDemo/TopologyPipelineDemo';
import { Basics } from './demos/Basics';
import { StyleEdges, StyleGroups, StyleLabels, StyleNodes } from './demos/Styles';
import { StyleEdges, StyleGroups, StyleLabels, StyleNodes } from './demos/stylesDemo/Styles';
import { Selection } from './demos/Selection';
import { PanZoom } from './demos/PanZoom';
import { Layouts } from './demos/Layouts';
import { Connectors } from './demos/Connectors';
import { DragAndDrop } from './demos/DragDrop';
import { Shapes } from './demos/Shapes';
import { ContextMenus } from './demos/ContextMenus';
import { TopologyPackage } from './demos/TopologyPackage';
import { TopologyPackage } from './demos/topologyPackageDemo/TopologyPackage';
import { ComplexGroup } from './demos/Groups';
import { CollapsibleGroups } from './demos/CollapsibleGroups';
import { StatusConnectors } from './demos/StatusConnectors';
import { StatusConnectors } from './demos/statusConnectorsDemo/StatusConnectors';

import './Demo.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Bendpoint: React.FunctionComponent<BendpointProps> = observer(({ point })
);
});

const DefaultEdge: React.FunctionComponent<EdgeProps> = ({
const DemoDefaultEdge: React.FunctionComponent<EdgeProps> = ({
element,
sourceDragRef,
targetDragRef,
Expand Down Expand Up @@ -76,4 +76,4 @@ const DefaultEdge: React.FunctionComponent<EdgeProps> = ({
);
};

export default observer(DefaultEdge);
export default observer(DemoDefaultEdge);
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type GroupProps = {
WithDndDragProps &
WithDndDropProps;

const DefaultGroup: React.FunctionComponent<GroupProps> = ({
const DemoDefaultGroup: React.FunctionComponent<GroupProps> = ({
element,
children,
selected,
Expand Down Expand Up @@ -93,4 +93,4 @@ const DefaultGroup: React.FunctionComponent<GroupProps> = ({
);
};

export default observer(DefaultGroup);
export default observer(DemoDefaultGroup);
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ComponentType } from 'react';
import { GraphElement, ComponentFactory, ModelKind, GraphComponent, DefaultNode } from '@patternfly/react-topology';
import Edge from './DefaultEdge';
import Edge from './DemoDefaultEdge';
import MultiEdge from './MultiEdge';
import Group from './DefaultGroup';
import Group from './DemoDefaultGroup';
import GroupHull from './GroupHull';

const defaultComponentFactory: ComponentFactory = (
Expand Down
233 changes: 0 additions & 233 deletions packages/demo-app-ts/src/data/generator.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/demo-app-ts/src/demos/CollapsibleGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ToolbarGroup, ToolbarItem, Checkbox } from '@patternfly/react-core';
import defaultLayoutFactory from '../layouts/defaultLayoutFactory';
import data from '../data/group-types';
import GroupHull from '../components/GroupHull';
import Group from '../components/DefaultGroup';
import Group from '../components/DemoDefaultGroup';
import DemoDefaultNode from '../components/DemoDefaultNode';
import defaultComponentFactory from '../components/defaultComponentFactory';

Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app-ts/src/demos/Connectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
GraphElementProps
} from '@patternfly/react-topology';
import defaultComponentFactory from '../components/defaultComponentFactory';
import DefaultEdge from '../components/DefaultEdge';
import DefaultEdge from '../components/DemoDefaultEdge';
import DemoDefaultNode from '../components/DemoDefaultNode';
import withTopologySetup from '../utils/withTopologySetup';
import NodeRect from '../components/NodeRect';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app-ts/src/demos/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
GraphElement
} from '@patternfly/react-topology';
import defaultComponentFactory from '../components/defaultComponentFactory';
import DefaultGroup from '../components/DefaultGroup';
import DefaultGroup from '../components/DemoDefaultGroup';
import DemoDefaultNode from '../components/DemoDefaultNode';
import defaultLayoutFactory from '../layouts/defaultLayoutFactory';
import withTopologySetup from '../utils/withTopologySetup';
Expand Down
8 changes: 4 additions & 4 deletions packages/demo-app-ts/src/demos/Layouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import {
import defaultLayoutFactory from '../layouts/defaultLayoutFactory';
import defaultComponentFactory from '../components/defaultComponentFactory';
import GroupHull from '../components/GroupHull';
import Group from '../components/DefaultGroup';
import Group from '../components/DemoDefaultGroup';
import DemoDefaultNode from '../components/DemoDefaultNode';
import withTopologySetup from '../utils/withTopologySetup';
import { generateDataModel } from '../data/generator';
import stylesComponentFactory from '../components/stylesComponentFactory';
import { generateDataModel } from './topologyPackageDemo/generator';
import stylesComponentFactory from './stylesDemo/stylesComponentFactory';
import { Tab, Tabs, TabTitleText } from '@patternfly/react-core';

const getModel = (layout: string): Model => {
// create nodes from data
const model = generateDataModel(200, 5, 20);
const model = generateDataModel(200, 5, 20, 0);
model.graph = {
id: 'g1',
type: 'graph',
Expand Down
Loading
Loading