elsa-workflows / elsa-workflows/elsa-core
Common place for IActivityPropertyOptionsProvider (like INotificationHandler does)?
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
I like the flexibility fields give when it shows us the javascript editor.
The problem is most these fields give us only three lines to edit code with no way to enlarge it.
So, looking at the source, I found that activities can customize how the editors will be presented, like the sample below:
```csharp
//implementation of IActivityPropertyOptionsProvider:
object? IActivityPropertyOptionsProvider.GetOptions(PropertyInfo property)
{
if (property.Name != "ZZZZZZZ")
return null;
return new
{
EditorHeight = "Large",
Context = nameof(RunJavaScript),
Syntax = JavaScriptExpressionHandler.SyntaxName
};
}
```
But I'm not comfortable on changing the source code, I'll lose it in future upgrades for sure.
So my question: is there any mechanism (like _**INotificationHandler**_) where we could configure the GetOptions() in a centralized way?
(note: specifically, I want to set the EditorHeight to Large to everything that is javascript, if there is something easier, it will resolve the problem)
Contributor guide
Assessment
This issue has not been assessed yet.