elsa-workflows / elsa-workflows/elsa-core

Add support for custom activity icons in v3

Open
#4,020 1 comment 0 reactions 0 assignees View on GitHub
core elsa 3 enhancement triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Is it possible to simply add icons to custom activities?
I searched the source code and found out that the `ActivityIconRegistry` is used to add icons but the `ActivityIconRegistry` is not exported therefore I can't import it inside my code.
Even if I can import the `ActivityIconRegistry` I'm not sure how to define the icon itself within my Angular application.

It would be really nice if I could set an `IconProvider` within the `Activity` attribute inside the backend.
This provider should be a class (same like the `OptionsProvider` from the `Input` attribute) with a specific interface which returns a svg icon as byte[] or string.
With this mechanism I don't have to add code to the frontend and can add an icon directly to the activity in the backend.

The `DefaultActivityTemplate` than simply has to check if the activity itself has an icon received from the backend and if not it should search inside the `ActivityIconRegistry` like it does for now.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing ActivityIconRegistry and DefaultActivityTemplate usage, then trace how the Activity attribute and OptionsProvider expose backend-provided metadata to the Angular frontend. Define the required backend icon-provider interface and frontend fallback behavior; done means custom activities can supply SVG icon data from the backend while registry lookup still works when none is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, csharp
Domain
backend, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.