Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f74d4ba
WIP: graphical edit
merefield May 13, 2026
493329c
WIP: refine graphical edit
merefield May 13, 2026
b87b8ab
DEV: modernize workflow admin visual editor
merefield May 14, 2026
295ba49
DEV: normalize admin route modules
merefield May 14, 2026
75dc810
DEV: refine visual workflow editor routing
merefield May 14, 2026
7b07e36
UX: preserve visual editor scroll position
merefield May 14, 2026
b6073af
CHORE: bump minor version
merefield May 14, 2026
927e9d1
DEV: remove redundant visual routing code
merefield May 14, 2026
c89daae
FIX: reorder workflow steps atomically
merefield May 14, 2026
6caa259
DEV: clarify safe visual color handling
merefield May 14, 2026
130759c
DEV: remove unused visual page helpers
merefield May 14, 2026
450c045
DEV: split visual routing specs
merefield May 14, 2026
ce787bf
FIX: drop stale visual workflow lanes
merefield May 14, 2026
eecc7db
FIX: scope visual workflow categories
merefield May 14, 2026
f944aac
FIX: handle workflow step destroy failures
merefield May 14, 2026
c19e269
UX: localize visual connector handles
merefield May 14, 2026
6b50b07
DEV: remove visual editor test backdoor
merefield May 14, 2026
8487e88
PERF: cache visual workflow options
merefield May 14, 2026
48c361c
FIX: set native visual drag payloads
merefield May 14, 2026
c6a22e6
UX: add visual connector click fallback
merefield May 14, 2026
a47d409
UX: use neutral visual step default name
merefield May 14, 2026
f41bd8f
FIX: fall back for custom workflow option labels
merefield May 14, 2026
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LinkTo } from "@ember/routing";
import { or } from "truth-helpers";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { or } from "discourse/truth-helpers";
import { i18n } from "discourse-i18n";

export default <template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LinkTo } from "@ember/routing";
import { or } from "truth-helpers";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { or } from "discourse/truth-helpers";
import { i18n } from "discourse-i18n";

export default <template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import DToggleSwitch from "discourse/components/d-toggle-switch";
import { popupAjaxError } from "discourse/lib/ajax-error";
import I18n, { i18n } from "discourse-i18n";
import WorkflowStepListEditor from "./workflow-step-list-editor";
import WorkflowVisualEditor from "./workflow-visual-editor";

export default class WorkflowEditor extends Component {
@service adminPluginNavManager;
Expand All @@ -26,6 +27,25 @@ export default class WorkflowEditor extends Component {
@tracked isSaving = false;
@tracked editingModel = null;
@tracked showDelete = false;
@tracked stepsView = "list";

get showingStepsList() {
return this.stepsView === "list";
}

get showingStepsVisual() {
return this.stepsView === "visual";
}

@action
showStepsList() {
this.stepsView = "list";
}

@action
showStepsVisual() {
this.stepsView = "visual";
}

@action
updateModel() {
Expand Down Expand Up @@ -266,13 +286,45 @@ export default class WorkflowEditor extends Component {
</div>
{{/if}}
{{#if this.showSteps}}
<div class="control-group">
<WorkflowStepListEditor
class="workflow-editor__steps"
@workflow={{@workflow}}
@disabled={{this.editingModel.system}}
@onChange={{this.stepsChanged}}
/>
<div class="control-group workflow-editor__steps-panel">
<div class="workflow-editor__steps-tabs">
<button
type="button"
class={{if
this.showingStepsList
"btn btn-primary workflow-editor__steps-tab"
"btn btn-default workflow-editor__steps-tab"
}}
{{on "click" this.showStepsList}}
>
{{i18n "admin.discourse_workflow.workflows.steps.tabs.list"}}
</button>
<button
type="button"
class={{if
this.showingStepsVisual
"btn btn-primary workflow-editor__steps-tab"
"btn btn-default workflow-editor__steps-tab"
}}
{{on "click" this.showStepsVisual}}
>
{{i18n "admin.discourse_workflow.workflows.steps.tabs.visual"}}
</button>
</div>

{{#if this.showingStepsList}}
<WorkflowStepListEditor
class="workflow-editor__steps"
@workflow={{@workflow}}
@disabled={{this.editingModel.system}}
@onChange={{this.stepsChanged}}
/>
{{else}}
<WorkflowVisualEditor
@workflow={{@workflow}}
@disabled={{this.editingModel.system}}
/>
{{/if}}
</div>
{{/if}}
<div class="control-group workflow-editor__action_panel">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LinkTo } from "@ember/routing";
import { or } from "truth-helpers";
import dIcon from "discourse-common/helpers/d-icon";
import dIcon from "discourse/helpers/d-icon";
import { or } from "discourse/truth-helpers";
import { i18n } from "discourse-i18n";

export default <template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ import DToggleSwitch from "discourse/components/d-toggle-switch";
import categoryLink from "discourse/helpers/category-link";
import concatClass from "discourse/helpers/concat-class";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators";
import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n";
import WorkflowLinkButton from "./workflow-link-button";
import WorkflowStepEditor from "./workflow-step-editor";

export default class WorkflowStepsListEditor extends Component {
@service adminPluginNavManager;
@service store;
@tracked currentWorkflowStep = this.args.currentWorkflowStep;

@tracked workflowSteps = [];
@tracked workflowStepsPresent = false;

get currentWorkflowStep() {
return this.args.currentWorkflowStep;
}

get newStep() {
return this.store.createRecord("workflow-step", {
workflow_id: this.args.workflow.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ import { later } from "@ember/runloop";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import { popupAjaxError } from "discourse/lib/ajax-error";
import DropdownSelectBox from "discourse/select-kit/components/dropdown-select-box";
import I18n, { i18n } from "discourse-i18n";
import DropdownSelectBox from "select-kit/components/dropdown-select-box";
import WorkflowBackButton from "./workflow-back-button";

export default class WorkflowStepOptionEditor extends Component {
@service adminPluginNavManager;
@service router;
@service store;
@service dialog;
@service toasts;
@service siteSettings;

@tracked isSaving = false;
@tracked editingModel = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ import DButton from "discourse/components/d-button";
import DPageSubheader from "discourse/components/d-page-subheader";
import concatClass from "discourse/helpers/concat-class";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { bind } from "discourse-common/utils/decorators";
import { bind } from "discourse/lib/decorators";
import { i18n } from "discourse-i18n";
import WorkflowLinkButton from "./workflow-link-button";
import WorkflowStepOptionEditor from "./workflow-step-option-editor";

export default class WorkflowStepOptionsListEditor extends Component {
@service store;
@tracked currentWorkflowStepOption = this.args.currentWorkflowStepOption;

@tracked workflowStepOptions = [];
@tracked workflowStepOptionsPresent = false;

get currentWorkflowStepOption() {
return this.args.currentWorkflowStepOption;
}

get newStepOption() {
return this.store.createRecord("workflow-step-option", {
workflow_step_id: this.args.workflowStep.id,
Expand Down
Loading