Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/style-minimap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@serverlessworkflow/diagram-editor": patch
---

Small styling tweaks to minimap and buttons
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@
min-width: 0 !important;
min-height: 0 !important;
}

/* minimap */
.dec-root .react-flow__minimap{
--xy-minimap-background-color: var(--dec-minimap-bg);
--xy-minimap-mask-background-color: var(--dec-minimap-mask);
--xy-minimap-mask-stroke-color: var(--dec-minimap-viewport);
--xy-minimap-node-background-color: var(--dec-minimap-node);
--xy-minimap-node-stroke-color: var(--dec-minimap-node-stroke);
--xy-minimap-node-stroke-width: 2;

border: 1px solid var(--dec-minimap-border);
border-radius:8px;
box-shadow: 0 4px 12px var(--dec-minimap-shadow);
overflow: hidden;
}

.dec-root .react-flow__minimap-node {
fill: var(--dec-minimap-node);
stroke: var(--dec-minimap-node-stroke);
stroke-width: 2;
}
Comment thread
lornakelly marked this conversation as resolved.
Comment thread
lornakelly marked this conversation as resolved.
}

/* custom nodes */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export const Diagram = ({ divRef, ref, colorMode = "light" }: DiagramProps) => {
nodesDraggable={!isReadOnly}
nodesConnectable={!isReadOnly}
>
{minimapVisible && <RF.MiniMap pannable zoomable position={"top-right"} />}
{minimapVisible && (
<RF.MiniMap pannable zoomable position={"bottom-left"} maskStrokeWidth={2} />
)}

<RF.Panel position="top-right">
<SidePanelTrigger />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,21 @@ export function MermaidActions({ model }: { model: Specification.Workflow }): Re

return (
<>
<Button onClick={handleCopyMermaid} variant="outline" size="sm">
<Button
onClick={handleCopyMermaid}
variant="outline"
size="sm"
className="dec:cursor-pointer"
>
{isCopied ? <ClipboardCheck /> : <ClipboardPen />}
{isCopied ? t("sidebar.exportMermaid.copied") : t("sidebar.exportMermaid.copy")}
</Button>
<Button onClick={handleDownloadMermaid} variant="outline" size="sm">
<Button
onClick={handleDownloadMermaid}
variant="outline"
size="sm"
className="dec:cursor-pointer"
>
<Download />
{t("sidebar.exportMermaid.download")}
</Button>
Expand Down
22 changes: 20 additions & 2 deletions packages/serverless-workflow-diagram-editor/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,31 @@
--dec-error-glow: rgba(239, 68, 68, 0.35);
--dec-edge-selected: #aea6a6;
--dec-edge-selected-condition: rgb(59 130 246);

/* minimap */
--dec-minimap-bg: #f8fafc;
--dec-minimap-mask: rgba(100, 116, 139, 0.25);
--dec-minimap-viewport: rgb(59 130 246);
--dec-minimap-node: #94a3b8;
--dec-minimap-node-stroke: #64748b;
--dec-minimap-border: #cbd5e1;
--dec-minimap-shadow: rgba(15, 23, 42, 0.12);
}

.dec-root.dark{
--dec-error-accent: #f87171;
.dec-root.dark {
--dec-error-accent: #f87171;
--dec-error-glow: rgba(248, 113, 113, 0.4);
--dec-edge-selected: #aea6a6;
--dec-edge-selected-condition: rgb(59 130 246);

/* minimap */
--dec-minimap-bg: #1a202c;
--dec-minimap-mask: rgba(2, 6, 23, 0.5);
--dec-minimap-viewport: rgb(96 165 250);
--dec-minimap-node: #94a3b8;
--dec-minimap-node-stroke: #cbd5e1;
--dec-minimap-border: #2d3748;
--dec-minimap-shadow: rgba(0, 0, 0, 0.5);
}

.dec-root .dec-diagram-content {
Expand Down
Loading