Getting Started
Prerequisites
Before contributing, ensure you have:- Flutter SDK (latest stable version)
- Git installed and configured
- A GitHub account
- Basic understanding of Dart and Flutter
- Familiarity with the editor architecture
Setting Up Your Development Environment
- Fork the repository on GitHub
- Clone your fork locally:
- Add upstream remote:
- Install dependencies:
- Run tests to ensure everything works:
Types of Contributions
We appreciate various types of contributions:Bug Fixes
Bug Fixes
Found a bug? We’d love your help fixing it!
- Check if an issue already exists
- Create a new issue if needed, describing the bug
- Reference the issue in your pull request
- Include tests that reproduce and fix the bug
New Features
New Features
Have an idea for a new feature?
- Open an issue to discuss the feature first
- Wait for maintainer feedback before implementing
- Keep the scope focused and manageable
- Include documentation and tests
- Update the CHANGELOG.md
Documentation
Documentation
Documentation improvements are always welcome!
- Fix typos or unclear explanations
- Add code examples
- Improve API documentation
- Create tutorials or guides
- Translate documentation
Tests
Tests
Help improve test coverage:
- Write unit tests for existing code
- Add integration tests
- Create widget tests
- Improve test organization
Code Refactoring
Code Refactoring
Make the codebase better:
- Improve code organization
- Remove code duplication
- Enhance performance
- Update deprecated APIs
Development Workflow
1. Create a Branch
Create a descriptive branch for your work:2. Make Your Changes
Follow these guidelines while coding:- Write clean, readable code
- Follow Dart style guidelines
- Add comments for complex logic
- Keep commits focused and atomic
- Write descriptive commit messages
3. Test Your Changes
Ensure all tests pass:4. Commit Your Changes
Write clear commit messages:feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or changesrefactor:Code refactoringchore:Maintenance tasksperf:Performance improvements
5. Keep Your Branch Updated
Regularly sync with the upstream repository:6. Submit a Pull Request
- Push your branch to your fork:
- Open a pull request on GitHub
- Fill out the pull request template
- Link related issues
- Wait for review
Code Style Guidelines
Dart Style
Follow the official Dart style guide:Naming Conventions
- Classes:
PascalCase(e.g.,EditorState,BlockComponent) - Variables/Functions:
camelCase(e.g.,editorState,updateSelection) - Constants:
lowerCamelCase(e.g.,defaultEditorStyle) - Private members: Prefix with
_(e.g.,_privateMethod)
Code Organization
Testing Guidelines
Writing Tests
Every contribution should include appropriate tests:Test Coverage
Aim for high test coverage:- Unit tests: For business logic and utilities
- Widget tests: For UI components
- Integration tests: For complex workflows
Documentation Guidelines
Code Documentation
Document public APIs thoroughly:README and Guides
When adding features, update relevant documentation:- Add examples to the example app
- Update README.md if needed
- Create or update guides
- Add migration notes for breaking changes
Pull Request Guidelines
PR Title Format
Use conventional commit format:feat: add table supportfix: cursor position after deletiondocs: update installation guidetest: add tests for selection service
PR Description Template
Review Process
- Automated checks run on your PR
- Maintainer review - be responsive to feedback
- Address comments by making requested changes
- Final approval and merge by maintainers
Be patient! Maintainers are often busy. If you haven’t heard back in a week, it’s okay to politely ping.
Common Contribution Scenarios
Fixing a typo
Fixing a typo
- Fork and clone the repository
- Make the fix in the relevant file
- Commit with message:
docs: fix typo in [file/section] - Push and open a PR
Implementing a requested feature
Implementing a requested feature
- Comment on the feature request issue
- Wait for maintainer go-ahead
- Create a branch:
feature/issue-number-description - Implement the feature with tests
- Update CHANGELOG.md
- Submit PR referencing the issue
Proposing a new feature
Proposing a new feature
- Open an issue describing the feature
- Include use cases and examples
- Discuss with maintainers
- Once approved, implement following the workflow
- Be prepared to iterate based on feedback
Reporting a bug with a fix
Reporting a bug with a fix
- Open an issue describing the bug
- Include reproduction steps
- Create a branch with the fix
- Add a test that would have caught the bug
- Submit PR referencing the issue
Getting Help
Need help contributing?- Discord: Join the AppFlowy Discord community
- GitHub Discussions: Ask questions or start discussions
- Issues: Comment on related issues for guidance
- Documentation: Check existing docs first
Recognition
Contributors are recognized in:- The CHANGELOG.md for each release
- GitHub contributors list
- Release notes
- Project README (for significant contributions)
Code of Conduct
Be respectful and constructive:- Use welcoming and inclusive language
- Respect differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy towards other community members
License
By contributing to AppFlowy Editor, you agree that your contributions will be licensed under the same license as the project (Apache License 2.0).Next Steps
View Examples
Study existing code and patterns
Check Issues
Find issues to work on
Read Changelog
See what’s been changed recently
API Reference
Understand the codebase