Contributing to Minimal Status Panel

Thank you for your interest in contributing! This document provides guidelines and information for contributors.

๐Ÿš€ Quick Start

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/yourusername/Minimal-Status-Panel.git
    cd Minimal-Status-Panel
    
  3. Install dependencies:
    npm install
    
  4. Start development environment:
    docker-compose up -d  # Starts Grafana + Prometheus + Blackbox Exporter
    npm run dev           # Starts development build with watch
    
  5. Access Grafana at http://localhost:3001 (admin/admin)

๐Ÿ”„ Development Workflow

1. Create a Feature Branch

git checkout -b feature/your-feature-name

2. Make Your Changes

3. Test Your Changes

npm run typecheck  # TypeScript checking
npm run lint       # Code linting
npm run test       # Run tests
npm run build      # Production build

4. Commit Your Changes

git add .
git commit -m "feat: add new feature description"

Commit Message Format:

5. Push and Create Pull Request

git push origin feature/your-feature-name

Then create a Pull Request on GitHub.

๐Ÿ“‹ Pull Request Guidelines

Before Submitting

PR Description Template

## Description
Brief description of changes

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [ ] Tested in development environment
- [ ] Added/updated tests
- [ ] Manual testing completed

## Screenshots (if applicable)
Add screenshots for UI changes

## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No console errors/warnings

๐Ÿงช Testing

Running Tests

npm test                 # Interactive test mode
npm run test:ci          # CI mode (single run)

Manual Testing

  1. Start development environment: docker-compose up -d
  2. Build plugin: npm run build
  3. Access Grafana: http://localhost:3001
  4. Create dashboard with Minimal Status Panel
  5. Test different configurations and scenarios

Test Coverage

๐Ÿ—๏ธ Architecture

Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ StatusPanel.tsx      # Main panel component
โ”‚   โ””โ”€โ”€ StatusIndicator.tsx  # Individual service cards
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ dataUtils.ts         # Data parsing utilities
โ”œโ”€โ”€ types.ts                 # TypeScript interfaces
โ”œโ”€โ”€ plugin.ts                # Panel options configuration
โ””โ”€โ”€ module.ts                # Plugin entry point

Key Concepts

๐ŸŽจ Code Style

TypeScript

React

CSS/Styling

๐Ÿ› Reporting Issues

Bug Reports

Include:

Feature Requests

Include:

๐Ÿ“– Documentation

Code Documentation

User Documentation

๐Ÿ”ง Development Environment

Requirements

{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "typescript.preferences.importModuleSpecifier": "relative"
}

Useful Commands

npm run dev         # Development build with watch
npm run build       # Production build
npm run typecheck   # TypeScript checking
npm run lint        # Lint code
npm run lint:fix    # Fix linting issues
npm test            # Run tests
docker-compose up   # Start development environment
docker-compose down # Stop development environment

๐ŸŽฏ Contribution Ideas

Good First Issues

Advanced Features

Infrastructure

๐Ÿ“ž Getting Help

๐Ÿ“„ License

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


Thank you for contributing to make this plugin better! ๐Ÿ™