First off, thank you for considering contributing to React Simile Timeline! It's people like you that make this project better for everyone.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, JSON data, screenshots)
- Describe the behavior you observed and what you expected
- Include your environment (OS, browser, Node version, React version)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- List any alternatives you've considered
- Fork the repo and create your branch from
dev - If you've added code that should be tested, add tests
- Ensure the test suite passes (
pnpm testandpnpm test:e2e) - Make sure your code lints (
pnpm lint) - Update documentation if needed
# Clone your fork
git clone https://github.com/YOUR_USERNAME/react-simile-timeline.git
cd react-simile-timeline
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Run tests
pnpm test # Unit tests
pnpm test:e2e # E2E tests
# Build library
pnpm build:lib├── packages/
│ └── react-simile-timeline/ # NPM library source
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom hooks
│ │ ├── styles/ # CSS styles
│ │ ├── types/ # TypeScript types
│ │ └── utils/ # Utility functions
│ └── package.json
├── demo/ # Demo application
│ ├── src/
│ ├── public/data/ # Sample JSON data
│ └── tests/ # Playwright E2E tests
└── docs/ # Documentation
- Use TypeScript with strict mode
- Follow the existing code style (enforced by ESLint/Prettier)
- Write meaningful commit messages
- Add JSDoc comments for public APIs
- Avoid
anytypes without justification
We use conventional commits. Format:
type(scope): description
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat(timeline): add zoom gesture supportfix(events): correct date parsing for BCE datesdocs(readme): add theming examples
- Unit tests: Vitest for component and utility testing
- E2E tests: Playwright for browser-based testing
# Run unit tests
pnpm test
# Run unit tests in watch mode
pnpm test:watch
# Run E2E tests
pnpm test:e2e
# Run E2E tests with UI
pnpm --filter demo exec playwright test --uiFeel free to open an issue with the "question" label or reach out via GitHub Discussions.
Thank you for contributing! 🎉