Skip to content

Commit

Permalink
refactor(Viz-Sidebar): Change panels style to flat and add rounded ed…
Browse files Browse the repository at this point in the history
…ges.
  • Loading branch information
mmelko authored and lhein committed Sep 13, 2024
1 parent 24f0fb1 commit c3cf5e0
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/ui/src/components/Form/CustomAutoFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function CustomAutoFields({
groupName={CatalogKind.Processor + ' ' + groupName}
isGroupExpanded={isGroupExpanded}
>
<Card className="nest-field-card">
<Card isFlat className="nest-field-card">
<CardBody className="nest-field-card-body">
{groupFields.map((field) => (
<AutoField key={field} name={field} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.custom-nest-field {
border-radius: 15px;

/* stylelint-disable-next-line selector-class-pattern */
.pf-v5-c-card__body {
display: grid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const CustomNestField = connectField(
if (propertiesArray.common.length === 0 && Object.keys(propertiesArray.groups).length === 0) return null;

return (
<Card className="custom-nest-field" data-testid={'nest-field'} {...filterDOMProps(props)}>
<Card isFlat className="custom-nest-field" data-testid={'nest-field'} {...filterDOMProps(props)}>
<CardHeader>
<CardTitle>{label}</CardTitle>
</CardHeader>
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/src/components/Visualization/Canvas/Canvas.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#topology-resize-panel {
/* stylelint-disable-next-line selector-class-pattern */
.pf-v5-c-drawer__splitter::after {
border: none;
}
}
1 change: 1 addition & 0 deletions packages/ui/src/components/Visualization/Canvas/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { CanvasDefaults } from './canvas.defaults';
import { CanvasEdge, CanvasNode, LayoutType } from './canvas.models';
import { ControllerService } from './controller.service';
import { FlowService } from './flow.service';
import './Canvas.scss';

interface CanvasProps {
contextToolbar?: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
position: absolute;
height: 100%;
}
/* stylelint-disable-next-line selector-class-pattern */
.pf-v5-c-drawer__splitter pf-m-vertical {
border: none;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.canvas-form {
height: 100%;
border-radius: 15px;

&__body {
overflow: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const CanvasForm: FunctionComponent<CanvasFormProps> = ({ selectedNode, o

return (
<ErrorBoundary key={selectedNode.id} fallback={<p>This node cannot be configured yet</p>}>
<Card className="canvas-form">
<Card isFlat className="canvas-form">
<CardHeader>
<CanvasFormHeader nodeId={selectedNode.id} title={title} onClose={onCloseFn} nodeIcon={vizNode?.data?.icon} />
</CardHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`CanvasForm should render 1`] = `
<div>
<div
class="pf-v5-c-card canvas-form"
class="pf-v5-c-card pf-m-flat canvas-form"
data-ouia-component-id="OUIA-Generated-Card-1"
data-ouia-component-type="PF5/Card"
data-ouia-safe="true"
Expand Down Expand Up @@ -286,7 +286,7 @@ exports[`CanvasForm should render 1`] = `
exports[`CanvasForm should render nothing if no schema and no definition is available 1`] = `
<div>
<div
class="pf-v5-c-card canvas-form"
class="pf-v5-c-card pf-m-flat canvas-form"
data-ouia-component-id="OUIA-Generated-Card-4"
data-ouia-component-type="PF5/Card"
data-ouia-safe="true"
Expand Down Expand Up @@ -551,7 +551,7 @@ exports[`CanvasForm should render nothing if no schema and no definition is avai
exports[`CanvasForm should render nothing if no schema is available 1`] = `
<div>
<div
class="pf-v5-c-card canvas-form"
class="pf-v5-c-card pf-m-flat canvas-form"
data-ouia-component-id="OUIA-Generated-Card-2"
data-ouia-component-type="PF5/Card"
data-ouia-safe="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`CanvasSideBar displays selected node information 1`] = `
role="dialog"
>
<div
class="pf-v5-c-card canvas-form"
class="pf-v5-c-card pf-m-flat canvas-form"
data-ouia-component-id="OUIA-Generated-Card-1"
data-ouia-component-type="PF5/Card"
data-ouia-safe="true"
Expand Down

0 comments on commit c3cf5e0

Please sign in to comment.