0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-08 17:53:55 +08:00
discourse/plugins/discourse-workflows
Renato Atilio 209fb1ac60
FEATURE: Show workflow expression references as editable pills (#41442)
Simple (and not so simple, but result of a drag event) field references
in expression inputs like `{{ $("Create Topic").first().json.topic.id
}}` now render as a pill (source badge + property path) instead of raw
expression syntax. The pill is purely a display layer; the document
still holds the real expression, so evaluation, validation and saving
are unchanged.

Pills are interactive: click to select, double-click (or the dropdown's
"Edit code") to edit the raw text, and a caret button / Enter / "."
opens a property picker to drill into objects or switch siblings without
ever surfacing the syntax. They can be dragged between fields (moving,
not copying) and respond to keyboard navigation. Validity is colored the
same way the editor does: valid, incomplete (resolves to an object), or
invalid.

<img width="645" height="203" alt="image"
src="https://github.com/user-attachments/assets/aef5b573-20cc-48c1-94b0-2e27626d5644"
/>


Each reference source gets its own badge: Input ($json/$input), Trigger
($trigger), Item index ($itemIndex), Variable, Current user, Site
setting, Execution, or the referenced node's name. Scope resolution also
learned plain array/bracket subscripts (`$json.items[0].id`), so such
references classify correctly instead of showing as invalid.

Anything more involved (method calls, arithmetic, multiple references)
is left as syntax-highlighted code, so the raw editor remains fully
available.

Clicking the empty area below the last line now focuses the editor and
places the caret at the end, making the whole field clickable.
2026-07-08 12:02:11 +02:00
..
admin/assets/javascripts FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
app FEATURE: adds user-search trigger to workflows (#41423) 2026-07-03 14:43:39 +02:00
assets FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
config FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
db/migrate FEATURE: Add sub workflow call support (#41019) 2026-06-25 15:01:05 +02:00
lib FEATURE: adds user-search trigger to workflows (#41423) 2026-07-03 14:43:39 +02:00
spec FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
test/javascripts FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
plugin.rb FEATURE: Show workflow expression references as editable pills (#41442) 2026-07-08 12:02:11 +02:00
USE_CASES.md FEATURE: Add AI authoring to Discourse Workflows (#40504) 2026-06-18 18:32:30 +02:00