-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor DataPanel usage and improve data handling (#384)
Replaced IDictionary with DataPanelModel to simplify data management and reduce complexity. Updated DataPanelItem to include a Label field and refactored various components to adopt the new model. Improved overall readability and consistency within data-related components.
- Loading branch information
1 parent
5de1164
commit e745daf
Showing
13 changed files
with
171 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
namespace Elsa.Studio.Models; | ||
|
||
public record DataPanelItem(string? Text = default, string? Link = default); | ||
public record DataPanelItem(string Label, string? Text = null, string? Link = null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Elsa.Studio.Models; | ||
|
||
public class DataPanelModel : List<DataPanelItem> | ||
{ | ||
public DataPanelModel() | ||
{ | ||
} | ||
|
||
public DataPanelModel(IEnumerable<DataPanelItem> collection) : base(collection) | ||
{ | ||
} | ||
|
||
public void Add(string label, string? text = null, string? link = null) => Add(new DataPanelItem(label, text, link)); | ||
} | ||
|
||
public static class DataPanelModelLinqExtensions | ||
{ | ||
public static DataPanelModel ToDataPanelModel(this IEnumerable<DataPanelItem> items) => new(items); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...lows/Components/WorkflowDefinitionEditor/Components/ActivityProperties/Tabs/InfoTab.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.