Contributing¶
Contributions are welcome! New Tab Hub is a vanilla JavaScript project — no build step, no framework, no toolchain to fight with.
Ways to Contribute¶
- New widgets — the most impactful contributions
- Firefox support — port to the WebExtension manifest format
- Bug fixes — check open issues on GitHub
- Code quality — the codebase was vibecoded; improvements are appreciated
- Accessibility — keyboard navigation, ARIA labels, contrast improvements
- Tests — the Jest suite always needs more coverage
- Documentation — corrections, examples, missing widget docs
Development Setup¶
Load the folder as an unpacked extension (see Installation), then edit and reload.
Adding a Widget¶
- Create
js/widgets/<widget-name>/index.js - Register it with
Hub.registry.register("<type>", { label, icon, render, load }) - Add a
mock.jsfor storybook preview (optional but helpful) - Add a doc page to
docs/widgets/<category>/<widget-name>.md - Add the page to the
navsection inmkdocs.yml
See any existing widget (e.g. js/widgets/weather/index.js) as a reference implementation.
Code Style¶
- Vanilla JS only — no frameworks, no npm packages in the extension itself
- Prefer editing existing files to creating new abstractions
- Match surrounding code style (indentation, naming)
- Run
npm testbefore submitting a PR
Pull Request Process¶
- Fork the repo and create a feature branch
- Keep PRs focused — one feature or fix per PR
- Include a description of what changed and why
- Tests for new functionality are appreciated
Reporting Bugs¶
Open an issue on GitHub with: - Browser name and version - Steps to reproduce - Expected vs actual behaviour - Console errors if any (F12 → Console)