Skip to content

Commit 022d8b1

Browse files
committed
Address review feedback
- Make the step card keyboard-selectable. The card root's onClick was mouse-only; role="button" on the root is not an option because it wraps the parameter inputs, so the step title becomes a real button with aria-pressed, matching the canvas node pattern. - Give the workflow canvas its own empty-state string. It rendered the same emptyPipelineHint the step list shows, so the identical sentence appeared twice whenever a model had no steps. - Report fan-in as "Merging pipelines are not supported yet" instead of reusing the branching message, which misled on a merge import. - Cover the cycle branch that the existing test never reached: its two-node loop carries two edges and is rejected by the earlier edge-count check, so add a three-node fixture with a chain-sized edge count that still leaves an untraversed loop, plus a merge-message test.
1 parent 5c079cf commit 022d8b1

22 files changed

Lines changed: 75 additions & 4 deletions

File tree

apps/geolibre-desktop/src/components/processing/ModelBuilderDialog.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ function WorkflowCanvas({
811811
>
812812
{steps.length === 0 ? (
813813
<p className="py-6 text-center text-xs text-muted-foreground">
814-
{t("processing.modelBuilder.emptyPipelineHint")}
814+
{t("processing.modelBuilder.canvasEmpty")}
815815
</p>
816816
) : (
817817
<div className="flex min-w-max items-center py-2">
@@ -909,9 +909,17 @@ function StepCard({
909909
onClick={onSelect}
910910
>
911911
<div className="mb-2 flex items-center justify-between gap-2">
912-
<span className="truncate text-sm font-medium">
912+
<button
913+
type="button"
914+
className="truncate rounded text-start text-sm font-medium"
915+
onClick={(event) => {
916+
event.stopPropagation();
917+
onSelect();
918+
}}
919+
aria-pressed={selected}
920+
>
913921
{index + 1}. {tool?.name ?? step.toolId}
914-
</span>
922+
</button>
915923
<div className="flex items-center gap-0.5">
916924
<button
917925
type="button"

apps/geolibre-desktop/src/i18n/locales/ar.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4316,6 +4316,7 @@
43164316
"importPipeline": "استيراد خط الأنابيب",
43174317
"exportPipeline": "تصدير خط الأنابيب",
43184318
"stepKindTransform": "تحويل",
4319+
"canvasEmpty": "لا توجد خطوات بعد — أضف خطوة لبناء سير العمل.",
43194320
"inputPreviousStep": "الإدخال: → ناتج الخطوة السابقة",
43204321
"unknownTool": "أداة غير معروفة \"{{id}}\"",
43214322
"noParameters": "لا توجد معاملات."

apps/geolibre-desktop/src/i18n/locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "Pipeline importieren",
40504050
"exportPipeline": "Pipeline exportieren",
40514051
"stepKindTransform": "Transformation",
4052+
"canvasEmpty": "Noch keine Schritte — fügen Sie einen hinzu, um den Arbeitsablauf aufzubauen.",
40524053
"inputPreviousStep": "Eingabe: ← Ausgabe des vorherigen Schritts",
40534054
"unknownTool": "Unbekanntes Werkzeug „{{id}}“",
40544055
"noParameters": "Keine Parameter."

apps/geolibre-desktop/src/i18n/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,6 +4059,7 @@
40594059
"importPipeline": "Import pipeline",
40604060
"exportPipeline": "Export pipeline",
40614061
"stepKindTransform": "Transform",
4062+
"canvasEmpty": "No steps yet — add one to build the workflow.",
40624063
"inputPreviousStep": "Input: ← previous step output",
40634064
"unknownTool": "Unknown tool \"{{id}}\"",
40644065
"noParameters": "No parameters."

apps/geolibre-desktop/src/i18n/locales/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "Importar canalización",
40504050
"exportPipeline": "Exportar canalización",
40514051
"stepKindTransform": "Transformación",
4052+
"canvasEmpty": "Aún no hay pasos: añade uno para crear el flujo de trabajo.",
40524053
"inputPreviousStep": "Entrada: ← salida del paso anterior",
40534054
"unknownTool": "Herramienta desconocida «{{id}}»",
40544055
"noParameters": "Sin parámetros."

apps/geolibre-desktop/src/i18n/locales/fa.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "درون‌ریزی خط لوله",
40504050
"exportPipeline": "برون‌بری خط لوله",
40514051
"stepKindTransform": "تبدیل",
4052+
"canvasEmpty": "هنوز مرحله‌ای وجود ندارد — برای ساخت گردش کار یکی اضافه کنید.",
40524053
"inputPreviousStep": "ورودی: → خروجی گام پیشین",
40534054
"unknownTool": "ابزار ناشناختهٔ «{{id}}»",
40544055
"noParameters": "بدون پارامتر."

apps/geolibre-desktop/src/i18n/locales/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "Importer le pipeline",
40504050
"exportPipeline": "Exporter le pipeline",
40514051
"stepKindTransform": "Transformation",
4052+
"canvasEmpty": "Aucune étape pour l'instant — ajoutez-en une pour créer le flux de travail.",
40524053
"inputPreviousStep": "Entrée : ← sortie de l'étape précédente",
40534054
"unknownTool": "Outil inconnu « {{id}} »",
40544055
"noParameters": "Aucun paramètre."

apps/geolibre-desktop/src/i18n/locales/hi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "पाइपलाइन आयात करें",
40504050
"exportPipeline": "पाइपलाइन निर्यात करें",
40514051
"stepKindTransform": "रूपांतरण",
4052+
"canvasEmpty": "अभी कोई चरण नहीं — वर्कफ़्लो बनाने के लिए एक जोड़ें।",
40524053
"inputPreviousStep": "इनपुट: ← पिछले चरण का आउटपुट",
40534054
"unknownTool": "अज्ञात टूल \"{{id}}\"",
40544055
"noParameters": "कोई पैरामीटर नहीं।"

apps/geolibre-desktop/src/i18n/locales/id.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3982,6 +3982,7 @@
39823982
"importPipeline": "Impor pipeline",
39833983
"exportPipeline": "Ekspor pipeline",
39843984
"stepKindTransform": "Transformasi",
3985+
"canvasEmpty": "Belum ada langkah — tambahkan satu untuk membangun alur kerja.",
39853986
"inputPreviousStep": "Masukan: ← keluaran langkah sebelumnya",
39863987
"unknownTool": "Alat tidak dikenal \"{{id}}\"",
39873988
"noParameters": "Tidak ada parameter."

apps/geolibre-desktop/src/i18n/locales/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,7 @@
40494049
"importPipeline": "Importa pipeline",
40504050
"exportPipeline": "Esporta pipeline",
40514051
"stepKindTransform": "Trasformazione",
4052+
"canvasEmpty": "Nessun passaggio — aggiungine uno per creare il flusso di lavoro.",
40524053
"inputPreviousStep": "Input: ← output del passaggio precedente",
40534054
"unknownTool": "Strumento sconosciuto «{{id}}»",
40544055
"noParameters": "Nessun parametro."

0 commit comments

Comments
 (0)