Adds a touch-friendly path for creating workflow edges from the mobile editor. - Add mobile node Connect controls with a target picker that delegates to the existing edge validation path.\n- Surface duplicate-edge feedback and select newly created mobile edges for editing.\n- Document the mobile connection flow, add regression coverage, register locale strings, and add the required changeset.\n\nFiles changed:\n .changeset/fn-6523-mobile-workflow-connect.md | 5 +\n docs/workflow-editor.md | 2 +-\n .../app/components/MobileWorkflowGraphView.css | 67 ++++++++++--\n .../app/components/MobileWorkflowGraphView.tsx | 76 ++++++++++++--\n .../app/components/WorkflowNodeEditor.tsx | 69 +++++++++++--\n .../__tests__/WorkflowNodeEditor.test.tsx | 114 +++++++++++++++++++++\n .../app/components/workflow-mobile-graph.ts | 7 ++\n packages/i18n/locales/en/app.json | 4 +\n packages/i18n/locales/es/app.json | 4 +\n packages/i18n/locales/fr/app.json | 4 +\n packages/i18n/locales/ko/app.json | 4 +\n packages/i18n/locales/zh-CN/app.json | 4 +\n packages/i18n/locales/zh-TW/app.json | 4 +\n 13 files changed, 342 insertions(+), 22 deletions(-) Fusion-Task-Id: FN-6523 Fusion-Task-Lineage: 23b32826-278f-4230-a49c-22755ee700cc
243 lines
4.9 KiB
CSS
243 lines
4.9 KiB
CSS
.mobile-wf-graph {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.mobile-wf-node-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.mobile-wf-node-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
gap: var(--space-xs);
|
|
padding-left: calc(var(--mobile-wf-depth, 0) * var(--space-md));
|
|
}
|
|
|
|
.mobile-wf-node-actions {
|
|
display: inline-flex;
|
|
align-items: stretch;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.mobile-wf-node-actions--connect {
|
|
justify-content: flex-end;
|
|
padding-left: calc((var(--mobile-wf-depth, 0) * var(--space-md)) + var(--space-xs));
|
|
}
|
|
|
|
.mobile-wf-node-main {
|
|
display: grid;
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
min-width: 0;
|
|
min-height: var(--wf-editor-touch-target);
|
|
padding: var(--space-sm);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-secondary);
|
|
color: var(--text);
|
|
text-align: left;
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--transition-fast),
|
|
transform var(--transition-fast),
|
|
box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.mobile-wf-node-main:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.mobile-wf-node-main:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.mobile-wf-node-main:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.mobile-wf-node-row--selected .mobile-wf-node-main {
|
|
border-color: var(--accent, var(--ws-info));
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.mobile-wf-node-kind {
|
|
min-width: 4.5rem;
|
|
max-width: 6rem;
|
|
padding: calc(var(--space-xs) / 2) var(--space-xs);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-muted);
|
|
font-size: 0.7rem;
|
|
text-align: center;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.mobile-wf-node-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
gap: calc(var(--space-xs) / 2);
|
|
}
|
|
|
|
.mobile-wf-node-title,
|
|
.mobile-wf-node-summary,
|
|
.mobile-wf-edge-target {
|
|
min-width: 0;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.mobile-wf-node-title {
|
|
color: var(--text);
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.mobile-wf-node-summary {
|
|
color: var(--text-muted);
|
|
font-size: 0.78rem;
|
|
}
|
|
|
|
.mobile-wf-node-expand,
|
|
.mobile-wf-connect-button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: var(--wf-editor-touch-target);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg-secondary);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--transition-fast),
|
|
transform var(--transition-fast),
|
|
box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.mobile-wf-node-expand {
|
|
width: var(--wf-editor-touch-target);
|
|
}
|
|
|
|
.mobile-wf-connect-button {
|
|
gap: var(--space-xs);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
}
|
|
|
|
.mobile-wf-node-expand:hover,
|
|
.mobile-wf-connect-button:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.mobile-wf-node-expand:focus-visible,
|
|
.mobile-wf-connect-button:focus-visible,
|
|
.mobile-wf-connect-select:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.mobile-wf-node-expand:active,
|
|
.mobile-wf-connect-button:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.mobile-wf-connect-picker {
|
|
display: grid;
|
|
gap: var(--space-xs);
|
|
padding-left: calc((var(--mobile-wf-depth, 0) * var(--space-md)) + var(--space-xs));
|
|
}
|
|
|
|
.mobile-wf-connect-label {
|
|
color: var(--text-muted);
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.mobile-wf-connect-select {
|
|
width: 100%;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.mobile-wf-node-row {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.mobile-wf-node-actions {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.mobile-wf-connect-button {
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
.mobile-wf-node-meta {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
padding-left: calc((var(--mobile-wf-depth, 0) * var(--space-md)) + var(--space-xs));
|
|
}
|
|
|
|
.mobile-wf-column-chip,
|
|
.mobile-wf-edge-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-height: 34px;
|
|
max-width: 100%;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg);
|
|
color: var(--text-muted);
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.mobile-wf-edge-chip {
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--transition-fast),
|
|
transform var(--transition-fast),
|
|
box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.mobile-wf-edge-chip:hover {
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.mobile-wf-edge-chip:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.mobile-wf-edge-chip:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.mobile-wf-edge-chip--selected {
|
|
border-color: var(--accent, var(--ws-info));
|
|
}
|
|
|
|
.mobile-wf-edge-target {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.mobile-wf-node-children {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.mobile-wf-graph-empty {
|
|
padding: var(--space-lg);
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
}
|