Skip to content

Contributing Guide

Thank you for your interest in contributing to Elaris.UI! This guide will help you get started.

Contributions are welcome! You can contribute in several ways:

  • Bug Reports: Report bugs by opening an issue
  • Feature Requests: Suggest new features
  • Code Contributions: Submit pull requests
  • Documentation: Improve documentation
  • Examples: Add example applications
  • .NET SDK 8.0 or 9.0
  • Git
  • A code editor (Visual Studio, VS Code, Rider, etc.)
Terminal window
git clone https://github.com/ambystechcom/Ambystech.Elaris.UI.git
cd Ambystech.Elaris.UI/lib
Terminal window
# Restore dependencies
dotnet restore
# Build the library
dotnet build
# Run tests
dotnet test
lib/
├── src/ # Source code
│ ├── Core/ # Core utilities
│ ├── Enums/ # Enumerations
│ ├── Input/ # Input handling
│ ├── Rendering/ # Rendering system
│ └── Widgets/ # Widget implementations
├── examples/ # Example applications
└── tests/ # Unit tests
  • Use C# 13.0 features where appropriate
  • Follow .NET naming conventions
  • Use meaningful variable and method names
  • Add XML documentation comments for public members
  • Use 4 spaces for indentation
  • Use var when the type is obvious
  • Use primary constructors where appropriate
  • Keep methods focused and small
/// <summary>
/// Creates a new widget with the specified text.
/// </summary>
/// <param name="text">The widget text</param>
public Widget(string text)
{
_text = text ?? string.Empty;
}
  • Add unit tests for new features
  • Test edge cases and error conditions
  • Use descriptive test names
  • Follow the existing test structure
Terminal window
dotnet test
public class MyWidgetTests
{
[Fact]
public void MyWidget_Should_Do_Something()
{
// Arrange
var widget = new MyWidget();
// Act
widget.DoSomething();
// Assert
Assert.True(widget.SomeProperty);
}
}
  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Add tests for new functionality
  5. Update documentation if needed
  6. Run tests: dotnet test
  7. Commit your changes: git commit -m "Add feature"
  8. Push to your fork: git push origin feature/my-feature
  9. Open a Pull Request
  • Provide a clear description of changes
  • Reference related issues
  • Ensure all tests pass
  • Update documentation as needed
  • Keep PRs focused and reasonably sized

When reporting issues, please include:

  • Description: Clear description of the issue
  • Steps to Reproduce: How to reproduce the issue
  • Expected Behavior: What should happen
  • Actual Behavior: What actually happens
  • Environment: .NET version, OS, terminal type
  • Screenshots: If applicable

Documentation improvements are always welcome:

  • Fix typos or errors
  • Add missing documentation
  • Improve examples
  • Add new examples
  • Clarify confusing sections

The documentation site is built with Astro Starlight:

Terminal window
cd site
npm install
npm run dev # Development server
npm run build # Build for production
  • Be respectful and inclusive
  • Welcome newcomers
  • Focus on constructive feedback
  • Help others learn

If you have questions about contributing:

  • Open an issue for discussion
  • Check existing issues and PRs
  • Review the codebase to understand patterns

By contributing, you agree that your contributions will be licensed under the MIT License.

Your contributions help make Elaris.UI better for everyone. Thank you for taking the time to contribute!