Dev Improvements #4

Merged
omegaleo merged 26 commits from dev into main 2025-12-09 23:55:56 +00:00
omegaleo commented 2025-12-09 23:55:05 +00:00 (Migrated from github.com)

This pull request introduces several new features and improvements to the Omega Leo Helper Library, including enhancements to the game library, documentation, and project governance. The most significant changes are the addition of new game utilities, improved changelog tooling, and the establishment of contribution and conduct guidelines.

Game Library Enhancements:

  • Added ListExtensions with a Shuffle<T> extension method for lists using a custom RandomNumberGenerator, improving utility for game development. (OmegaLeo.HelperLib.Game/Extensions/ListExtensions.cs)
  • Introduced DelayedActionHandler to manage and cancel delayed actions in games, providing a more robust way to handle time-based events. (OmegaLeo.HelperLib.Game/Handlers/DelayedActionHandler.cs)
  • Added ISaveFileProvider interface to abstract save file management, making it easier to customize save locations and file handling. (OmegaLeo.HelperLib.Game/Interfaces/ISaveFileProvider.cs)

Changelog and Documentation Improvements:

  • Integrated NetFlow.DocumentationHelper.Library as a reference and package in the changelog project, and annotated changelog-related classes and methods with documentation attributes for better code documentation and tooling support. (OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj, OmegaLeo.HelperLib.Changelog/Attributes/ChangelogAttribute.cs, OmegaLeo.HelperLib.Changelog/Tools/ChangelogTool.cs) [1] [2] [3] [4]

Project Governance:

  • Added a comprehensive CODE_OF_CONDUCT.md to establish community standards and enforcement guidelines.
  • Added a detailed CONTRIBUTING.md to guide contributors on how to participate, report issues, suggest enhancements, and follow project styleguides.

Build and Release Automation:

  • Updated the GitHub workflow (.github/workflows/nuget-publish.yml) to automate publishing and asset uploading for the game library NuGet package, streamlining releases.
This pull request introduces several new features and improvements to the Omega Leo Helper Library, including enhancements to the game library, documentation, and project governance. The most significant changes are the addition of new game utilities, improved changelog tooling, and the establishment of contribution and conduct guidelines. **Game Library Enhancements:** * Added `ListExtensions` with a `Shuffle<T>` extension method for lists using a custom `RandomNumberGenerator`, improving utility for game development. (`OmegaLeo.HelperLib.Game/Extensions/ListExtensions.cs`) * Introduced `DelayedActionHandler` to manage and cancel delayed actions in games, providing a more robust way to handle time-based events. (`OmegaLeo.HelperLib.Game/Handlers/DelayedActionHandler.cs`) * Added `ISaveFileProvider` interface to abstract save file management, making it easier to customize save locations and file handling. (`OmegaLeo.HelperLib.Game/Interfaces/ISaveFileProvider.cs`) **Changelog and Documentation Improvements:** * Integrated `NetFlow.DocumentationHelper.Library` as a reference and package in the changelog project, and annotated changelog-related classes and methods with documentation attributes for better code documentation and tooling support. (`OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj`, `OmegaLeo.HelperLib.Changelog/Attributes/ChangelogAttribute.cs`, `OmegaLeo.HelperLib.Changelog/Tools/ChangelogTool.cs`) [[1]](diffhunk://#diff-71749a1eb0f278bf69b6a1f706a09aff689de22b1e2ee868d81fd8ec4693e639R21-R30) [[2]](diffhunk://#diff-e2210a58781a0190ca964ebc48aab3add9caa242548135f647e03acc876167f9R2-R7) [[3]](diffhunk://#diff-a9447952b91f16c8e58ec715157a0fdac46bf6b1db9b00397cfde18c4c9b4d6bR5-R14) [[4]](diffhunk://#diff-a9447952b91f16c8e58ec715157a0fdac46bf6b1db9b00397cfde18c4c9b4d6bR38) **Project Governance:** * Added a comprehensive `CODE_OF_CONDUCT.md` to establish community standards and enforcement guidelines. * Added a detailed `CONTRIBUTING.md` to guide contributors on how to participate, report issues, suggest enhancements, and follow project styleguides. **Build and Release Automation:** * Updated the GitHub workflow (`.github/workflows/nuget-publish.yml`) to automate publishing and asset uploading for the game library NuGet package, streamlining releases.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-12-09 23:58:48 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This pull request introduces several development improvements to the Omega Leo Helper Library, including game library enhancements, documentation tooling improvements, and project governance additions. The main focus is on adding new game utilities (ListExtensions, DelayedActionHandler, ISaveFileProvider), improving changelog tooling with documentation attributes, and establishing contribution/conduct guidelines.

Key Changes

  • Added new game development utilities for shuffling, delayed actions, and save file management
  • Integrated NetFlow.DocumentationHelper.Library to annotate changelog classes with documentation attributes
  • Enhanced NeoDictionary with additional methods and documentation attributes
  • Added third-party libraries (jQuery, jQuery Validation) to the Web project
  • Established CODE_OF_CONDUCT.md and CONTRIBUTING.md for project governance

Reviewed changes

Copilot reviewed 56 out of 113 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj Added deprecated PackageLicenseUrl property
OmegaLeo.HelperLib/Models/NeoDictionary.cs Added new methods, implicit operator, and documentation attributes
OmegaLeo.HelperLib/Helpers/BenchmarkUtility.cs Simplified stopwatch initialization logic
OmegaLeo.HelperLib.sln Added new Web and Game projects to solution
OmegaLeo.HelperLib.Web/wwwroot/lib/* Added third-party jQuery and validation libraries (minified files)
OmegaLeo.HelperLib.sln.DotSettings.user IDE-specific user settings file additions
Files not reviewed (4)
  • .idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.agent.xml: Language not supported
  • .idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.ask.xml: Language not supported
  • .idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.ask2agent.xml: Language not supported
  • .idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.edit.xml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview This pull request introduces several development improvements to the Omega Leo Helper Library, including game library enhancements, documentation tooling improvements, and project governance additions. The main focus is on adding new game utilities (`ListExtensions`, `DelayedActionHandler`, `ISaveFileProvider`), improving changelog tooling with documentation attributes, and establishing contribution/conduct guidelines. ### Key Changes - Added new game development utilities for shuffling, delayed actions, and save file management - Integrated `NetFlow.DocumentationHelper.Library` to annotate changelog classes with documentation attributes - Enhanced NeoDictionary with additional methods and documentation attributes - Added third-party libraries (jQuery, jQuery Validation) to the Web project - Established CODE_OF_CONDUCT.md and CONTRIBUTING.md for project governance ### Reviewed changes Copilot reviewed 56 out of 113 changed files in this pull request and generated 8 comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj | Added deprecated PackageLicenseUrl property | | OmegaLeo.HelperLib/Models/NeoDictionary.cs | Added new methods, implicit operator, and documentation attributes | | OmegaLeo.HelperLib/Helpers/BenchmarkUtility.cs | Simplified stopwatch initialization logic | | OmegaLeo.HelperLib.sln | Added new Web and Game projects to solution | | OmegaLeo.HelperLib.Web/wwwroot/lib/* | Added third-party jQuery and validation libraries (minified files) | | OmegaLeo.HelperLib.sln.DotSettings.user | IDE-specific user settings file additions | </details> <details> <summary>Files not reviewed (4)</summary> * **.idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.agent.xml**: Language not supported * **.idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.ask.xml**: Language not supported * **.idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.ask2agent.xml**: Language not supported * **.idea/.idea.OmegaLeo.HelperLib/.idea/copilot.data.migration.edit.xml**: Language not supported </details> --- 💡 <a href="/omegaleo/HelperLib/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@@ -0,0 +10,4 @@
{
private readonly Dictionary<string, ConsoleCommand> _commands = new Dictionary<string, ConsoleCommand>(StringComparer.OrdinalIgnoreCase);
private readonly List<string> _history = new List<string>();
private int _maxHistorySize = 100;
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:48 +00:00

Field '_maxHistorySize' can be 'readonly'.

        private readonly int _maxHistorySize = 100;
Field '_maxHistorySize' can be 'readonly'. ```suggestion private readonly int _maxHistorySize = 100; ```
@@ -0,0 +145,4 @@
}
else
{
current += c;
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:48 +00:00

String concatenation in loop: use 'StringBuilder'.

String concatenation in loop: use 'StringBuilder'.
@@ -0,0 +26,4 @@
var root = GetSolutionRoot();
_libraryCache = new Dictionary<string, LibraryDocumentationViewModel>
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:47 +00:00

Write to static field from instance method, property, or constructor.

Write to static field from instance method, property, or constructor.
@@ -0,0 +59,4 @@
public IActionResult Library(string id)
{
if (string.IsNullOrEmpty(id) || !_libraryCache.ContainsKey(id))
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:48 +00:00

Inefficient use of 'ContainsKey' and indexer.

Inefficient use of 'ContainsKey' and [indexer](1).
@@ -0,0 +248,4 @@
$forms.each(function () {
var info = validationInfo(this);
if (info) {
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:48 +00:00

This use of variable 'info' always evaluates to true.

This use of variable 'info' always evaluates to true.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:47 +00:00

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

This foreach loop [implicitly filters its target sequence](1) - consider filtering the sequence explicitly using '.Where(...)'.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:47 +00:00

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

This foreach loop [implicitly filters its target sequence](1) - consider filtering the sequence explicitly using '.Where(...)'.
@@ -10,6 +10,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/omegaleo/HelperLib</PackageProjectUrl>
<RepositoryUrl>https://github.com/omegaleo/HelperLib</RepositoryUrl>
<PackageLicenseUrl>https://github.com/omegaleo/HelperLib/blob/main/LICENSE</PackageLicenseUrl>
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-09 23:58:47 +00:00

The PackageLicenseUrl property is deprecated in favor of PackageLicenseExpression or PackageLicenseFile. Consider using one of these alternatives instead.

For example, if the project uses MIT license:

<PackageLicenseExpression>MIT</PackageLicenseExpression>

Or to reference a license file in the project:

<PackageLicenseFile>LICENSE</PackageLicenseFile>
The `PackageLicenseUrl` property is deprecated in favor of `PackageLicenseExpression` or `PackageLicenseFile`. Consider using one of these alternatives instead. For example, if the project uses MIT license: ```xml <PackageLicenseExpression>MIT</PackageLicenseExpression> ``` Or to reference a license file in the project: ```xml <PackageLicenseFile>LICENSE</PackageLicenseFile> ```
omegaleo (Migrated from github.com) reviewed 2025-12-09 23:59:23 +00:00
@@ -10,6 +10,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageProjectUrl>https://github.com/omegaleo/HelperLib</PackageProjectUrl>
<RepositoryUrl>https://github.com/omegaleo/HelperLib</RepositoryUrl>
<PackageLicenseUrl>https://github.com/omegaleo/HelperLib/blob/main/LICENSE</PackageLicenseUrl>
omegaleo (Migrated from github.com) commented 2025-12-09 23:59:23 +00:00

@copilot open a new pull request to apply changes based on this feedback

@copilot open a new pull request to apply changes based on [this feedback](https://github.com/omegaleo/HelperLib/pull/4#discussion_r2604733738)
Sign in to join this conversation.