elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.3k stars 1.16k forks source link

Activity DisplayName #4341

Open liuliang-wt opened 1 year ago

liuliang-wt commented 1 year ago

image

version 2.12, the dashboard display the activity's class name, it should be the activity's DisplayName, and how do I localize the activity's DisplayName,Category and Description?

sfmskywalker commented 1 year ago

Hi @liuliang-wt,

Thank you for bringing this to our attention. I see from the screenshot and your description that the dashboard is currently displaying the activity's class name instead of its DisplayName. I concur with your suggestion that it would be more intuitive to display the activity's DisplayName. This would indeed provide a clearer understanding of the activity type being configured.

Regarding your query about localizing the activity's DisplayName, Category, and Description, Elsa does not currently support server-side localization. We'll look into how this can be better integrated or documented.

Thanks for your valuable feedback.

liuliang-wt commented 1 year ago

I can see that the frontend get activity's information from /v1/activities api, I think you may change the logic a bit, instead of returing DisplayName, Category, and Description I set in ActivityAttribute, you may use it as a key to look up in the IStringLocalizer first. BTW, I found that when I open the workflow designer, this /v1/activities will be called twice, is it a bug? image

sNakiex commented 1 year ago

@liuliang-wt I believe the first call is a OPTIONS call and the second call is the actual GET.

liuliang-wt commented 1 year ago

@liuliang-wt I believe the first call is a OPTIONS call and the second call is the actual GET.

no, it's not, both of them are GET image