Thank you for considering contributing to DeepPhe Visualizer v2! This document outlines the process and guidelines for contributing.
Be respectful, constructive, and professional in all interactions.
Before submitting a bug report:
- Check the issue tracker to avoid duplicates
- Use the latest version of DeepPhe Visualizer v2
- Collect relevant information (browser, Node version, error messages)
When submitting a bug report, include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Browser and environment details
Feature requests are welcome! Please:
- Search existing issues first
- Describe the feature and its use case
- Explain how it benefits users
- Consider implementation complexity
- Fork the repository
- Create a feature branch from
maingit checkout -b feature/your-feature-name
- Make your changes
- Write or update tests
- Run the test suite
npm test npm run lint npm run lint:a11y - Commit with clear messages
- Push to your fork
- Open a Pull Request
# Clone your fork
git clone https://github.com/your-username/DeepPhe-Visualizer-v2.git
cd DeepPhe-Visualizer-v2
# Install dependencies
npm install --legacy-peer-deps
# Start development server
npm start- Use functional components with hooks
- Follow ESLint rules (run
npm run lint) - Use meaningful variable and function names
- Add JSDoc comments for complex functions
- Keep components small and focused (under 300 lines)
- Extract reusable logic into custom hooks
- All interactive elements must be keyboard accessible
- Images require descriptive alt text
- Form inputs must have labels
- Use semantic HTML elements
- Test with screen readers when possible
- Run
npm run lint:a11ybefore committing
- Write tests for new features
- Maintain or improve code coverage
- Use React Testing Library best practices
- Test user interactions, not implementation details
- Run
npm test -- --coverageto check coverage
src/
├── components/ # Reusable UI components
├── views/ # Page-level components
├── hooks/ # Custom React hooks
├── utils/ # Pure utility functions
├── controllers/ # Business logic
├── clients/ # API clients
└── constants/ # Application constants
- Components: PascalCase (e.g.,
FilterableTable.jsx) - Hooks: camelCase with "use" prefix (e.g.,
useDataLoader.js) - Utilities: camelCase (e.g.,
dataProcessing.js) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_BAR_CHART_VALUES)
Write clear, descriptive commit messages:
Add feature: Brief description
Longer explanation of what changed and why.
- Specific change 1
- Specific change 2
Good examples:
Add accessibility labels to data tablesFix filter reset bug in debug viewRefactor useDataLoader hook for better error handling
Avoid:
fix bugupdate stuffwip
Place test files next to source files:
src/utils/
├── dataProcessing.js
└── __tests__/
└── dataProcessing.test.js
describe('ComponentName', () => {
describe('when condition', () => {
it('should do something specific', () => {
// Arrange
const input = setupInput();
// Act
const result = performAction(input);
// Assert
expect(result).toBe(expected);
});
});
});- Manual keyboard testing (Tab, Enter, Space, Arrow keys)
- Check axe-core warnings in browser console
- Test with screen reader if possible (VoiceOver, NVDA)
- Verify color contrast meets WCAG 2.1 AA (4.5:1)
Update documentation when:
- Adding new features
- Changing APIs or interfaces
- Modifying configuration
- Adding dependencies
Update these files as needed:
- README.md - User-facing documentation
- ACCESSIBILITY.md - Accessibility guidelines
- JSDoc comments - Function documentation
- Code comments - Complex logic explanation
Pull requests will be reviewed for:
- Code quality and style
- Test coverage
- Accessibility compliance
- Documentation updates
- Performance considerations
- Breaking changes
Reviewers may request changes. Please respond promptly and address feedback.
Maintainers handle releases. Contributors should:
- Target the
mainbranch for features - Update CHANGELOG.md for significant changes
- Note any breaking changes clearly
Open an issue with the "question" label or reach out to maintainers.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.