Description
Description
IControlsService
The IControlsService interface now includes a new method:
Task<ControlIssueModel> GetControlIssues(string controlGroup, IEnumerable<string> labels);
The supported control groups are:
public const string BuiltInControls = nameof(BuiltInControls); ✅
public const string SyncfusionControls = nameof(SyncfusionControls); ⛔
public const string DevExpressControls = nameof(DevExpressControls); ⛔
public const string CommunityToolkit = nameof(CommunityToolkit); ⛔
public const string GitHubCommunity = nameof(GitHubCommunity); ⛔
public const string MaterialComponent = nameof(MaterialComponent); ⛔
Implement the logic of this method in ControlsService.cs with these below goals
- Retrieve Control Issues by Labels: Implement the logic in ControlsService.cs to fetch control issues by labels. Currently, only BuiltInControls is supported. Example usage:
string controlLabel = "control/activity-Indicator";
string platformLabel = "platform/windows";
List<string> labelsList = new(){ controlLabel, platformLabel };
IControlsService.GetControlIssues.GetControlIssues(nameof(BuiltInControls), labelsList);
The implementation will attach
string owner = "dotnet";
string repository = "maui";
IGitHubService.GetGitHubIssuesByLabels(owner, repository, labelsList);
⚠️ Support for other control groups will be added in the future.
- Save Issues to Local Database:
Utilize the provided GitHubIssueLocalDbModel to save issues to the local database. The model needs a control name property to indicate the control to which the issue belongs.
Ensure to cache issues retrieved from IGitHubService for 1 hour. When GetControlIssues is invoked, check the local database first. If the cache expires, use IGitHubService to fetch issues and save them to the database.
[Table("IssueModel")]
public class GitHubIssueLocalDbModel : BaseLocalEntity
{
#region [ CTor ]
public GitHubIssueLocalDbModel()
{
}
#endregion
#region [ Properties ]
// control name
[Column("issue_id")]
public long IssueId { get; set; }
[Column("title")]
public string Title { get; set; }
[Column("issue_link_url")]
public string IssueLinkUrl { get; set; }
[Column("mile_stone")]
public string MileStone { get; set; }
[Column("owner_name")]
public string OwnerName { get; set; }
[Column("created_date")]
public DateTime CreatedDate { get; set; }
[Column("last_updated")]
public DateTime LastUpdated { get; set; }
#endregion
}
⚠️ The control name property is missing in the provided model.
By incorporating these updates, IControlsService will offer enhanced functionality to retrieve and manage control-related issues.
Public API Changes
IControlsService.GetControlIssues(nameof(BuiltInControls), labelsList);
Intended Use-Case
Get related issues related to control
Metadata
Assignees
Labels
Projects
Status
Done
Activity