Skip to content

Latest commit

 

History

History
393 lines (290 loc) · 9.4 KB

File metadata and controls

393 lines (290 loc) · 9.4 KB

Contributing to Rapid Development Platform Prototype

Thank you for your interest in contributing to the Rapid Development Platform Prototype! This document provides guidelines and information for contributors.

📋 Table of Contents

🤝 Code of Conduct

This project adheres to a code of conduct that we expect all contributors to follow. Please be respectful, inclusive, and constructive in all interactions.

Our Pledge

  • Be respectful and inclusive
  • Welcome newcomers and help them learn
  • Focus on what's best for the community
  • Show empathy towards other community members

🚀 Getting Started

Prerequisites

  • A modern web browser
  • Basic knowledge of HTML, CSS, and JavaScript
  • Git installed on your system
  • A GitHub account

Fork and Clone

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/rapid-dev-platform-prototype.git
    cd rapid-dev-platform-prototype
  3. Add the upstream repository:
    git remote add upstream https://github.com/original-owner/rapid-dev-platform-prototype.git

🔄 How to Contribute

Types of Contributions

We welcome several types of contributions:

  • Bug Reports: Report issues and bugs
  • Feature Requests: Suggest new features
  • Code Contributions: Submit code improvements
  • Documentation: Improve documentation
  • Design: Enhance UI/UX design
  • Testing: Help with testing and quality assurance

Contribution Workflow

  1. Check Existing Issues: Look for existing issues or discussions
  2. Create an Issue: If no existing issue, create one to discuss your contribution
  3. Fork and Branch: Create a feature branch from main
  4. Make Changes: Implement your changes
  5. Test: Test your changes thoroughly
  6. Submit PR: Create a pull request with a clear description

🛠️ Development Setup

Local Development

  1. Start a Local Server:

    # Using Python
    python -m http.server 8000
    
    # Using Node.js
    npx serve .
    
    # Using PHP
    php -S localhost:8000
  2. Open in Browser: Navigate to http://localhost:8000/prototypes/dashboard.html

  3. Make Changes: Edit files and refresh browser to see changes

Project Structure

prototypes/
├── css/           # Shared styles
├── js/            # JavaScript utilities
├── images/        # Image assets
└── *.html         # Individual pages

📝 Coding Standards

HTML Standards

  • Use semantic HTML5 elements
  • Include proper DOCTYPE and meta tags
  • Use consistent indentation (2 spaces)
  • Include alt attributes for images
  • Use meaningful class and ID names
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Page Title</title>
</head>
<body>
    <!-- Content -->
</body>
</html>

CSS Standards

  • Use consistent indentation (2 spaces)
  • Follow BEM methodology for class naming
  • Use CSS custom properties for theming
  • Include comments for complex styles
  • Organize styles logically
/* Component styles */
.component {
    display: flex;
    align-items: center;
    padding: 16px;
}

.component__element {
    margin-right: 8px;
}

.component--modifier {
    background-color: var(--primary-color);
}

JavaScript Standards

  • Use modern ES6+ syntax
  • Use consistent indentation (2 spaces)
  • Include JSDoc comments for functions
  • Use meaningful variable and function names
  • Handle errors gracefully
/**
 * Updates the breadcrumb navigation
 * @param {string} currentPage - The current page name
 */
function updateBreadcrumb(currentPage) {
    try {
        const breadcrumbList = document.querySelector('.breadcrumb-list');
        if (!breadcrumbList) return;
        
        // Implementation
    } catch (error) {
        console.error('Error updating breadcrumb:', error);
    }
}

File Naming

  • Use kebab-case for file names
  • Use descriptive names
  • Include file type in name when appropriate

Examples:

  • user-profile.html
  • data-management.js
  • component-styles.css

🔀 Pull Request Process

Before Submitting

  1. Update Documentation: Update relevant documentation
  2. Test Changes: Test your changes thoroughly
  3. Check Responsiveness: Ensure changes work on all screen sizes
  4. Validate HTML/CSS: Use validators to check code quality
  5. Update Version: Update version numbers if applicable

PR Description Template

## Description
Brief description of changes

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

## Testing
- [ ] Tested on desktop
- [ ] Tested on tablet
- [ ] Tested on mobile
- [ ] Cross-browser testing

## Screenshots
Include screenshots if applicable

## Checklist
- [ ] Code follows project standards
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No console errors

Review Process

  1. Automated Checks: CI/CD checks must pass
  2. Code Review: At least one maintainer review required
  3. Testing: Changes must be tested
  4. Documentation: Documentation must be updated
  5. Approval: Maintainer approval required for merge

🐛 Issue Reporting

Bug Reports

When reporting bugs, please include:

  1. Clear Title: Descriptive title
  2. Description: Detailed description of the issue
  3. Steps to Reproduce: Step-by-step reproduction steps
  4. Expected Behavior: What should happen
  5. Actual Behavior: What actually happens
  6. Environment: Browser, OS, device information
  7. Screenshots: If applicable

Bug Report Template

**Describe the bug**
A clear description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
What you expected to happen.

**Screenshots**
If applicable, add screenshots.

**Environment:**
- OS: [e.g. Windows 10]
- Browser: [e.g. Chrome 90]
- Version: [e.g. 1.0.0]

**Additional context**
Any other context about the problem.

💡 Feature Requests

Feature Request Guidelines

  1. Check Existing Issues: Search for similar requests
  2. Clear Description: Provide detailed description
  3. Use Cases: Explain why this feature is needed
  4. Mockups: Include mockups or wireframes if possible
  5. Implementation Ideas: Suggest implementation approach

Feature Request Template

**Feature Description**
A clear description of the feature.

**Problem Statement**
What problem does this feature solve?

**Proposed Solution**
How should this feature work?

**Alternatives Considered**
Other solutions you've considered.

**Additional Context**
Any other context or screenshots.

📚 Documentation

Documentation Standards

  • Use clear, concise language
  • Include code examples
  • Provide screenshots when helpful
  • Keep documentation up-to-date
  • Use consistent formatting

Types of Documentation

  • README: Project overview and setup
  • API Documentation: Function and method documentation
  • User Guides: Step-by-step usage instructions
  • Developer Guides: Technical implementation details
  • Changelog: Version history and changes

🧪 Testing

Testing Guidelines

  • Test on multiple browsers
  • Test on different screen sizes
  • Test with different data sets
  • Test edge cases and error conditions
  • Include both manual and automated testing

Testing Checklist

  • Desktop browser testing
  • Mobile browser testing
  • Responsive design testing
  • Cross-browser compatibility
  • Performance testing
  • Accessibility testing

🎨 Design Contributions

Design Guidelines

  • Follow existing design system
  • Maintain consistency with current UI
  • Consider accessibility requirements
  • Provide multiple design options
  • Include design rationale

Design Assets

  • Use standard design tools (Figma, Sketch, etc.)
  • Export assets in appropriate formats
  • Provide both light and dark mode versions
  • Include responsive design considerations
  • Document design decisions

📞 Getting Help

Communication Channels

  • GitHub Issues: For bug reports and feature requests
  • GitHub Discussions: For general questions and discussions
  • Pull Request Comments: For code review discussions

Response Times

  • Bug Reports: Within 48 hours
  • Feature Requests: Within 1 week
  • Pull Requests: Within 3-5 business days
  • General Questions: Within 1 week

🏆 Recognition

Contributors will be recognized in:

  • README: Listed as contributors
  • Release Notes: Mentioned in relevant releases
  • GitHub: Contributor statistics and activity
  • Documentation: Credited for significant contributions

📄 License

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

🙏 Thank You

Thank you for contributing to the Rapid Development Platform Prototype! Your contributions help make this project better for everyone.


Happy Contributing! 🚀