We welcome any meaningful contributions to Tophat. This includes bug fixes, performance improvements, and new features that would be beneficial to all Tophat users.
We expect all participants to read our code of conduct to understand which actions are and aren’t tolerated.
Each contributor is required to sign a CLA. This process is automated as part of your first pull request and is only required once. If any contributor has not signed the CLA or does not have an associated GitHub account, the CLA check will fail and the pull request cannot be merged.
Tophat is a macOS app build with Swift and SwiftUI.
Tophat is a modular codebase and leverages Swift Packages to compartmentalize code. Where applicable, favour extensibility—code should be loosely coupled to make extending or removing Tophat functionality as easy as possible. When adding new functionality, consider what abstractions would help with identifying the boundary of the new feature.
- Use tabs for indentation.
- Try to keep line lengths short and easy to digest.
- When in doubt, try to match the style of other code in the project.
Tophat is designed to offer a seamless experience, especially for those familiar with developer tooling on macOS.
- Look and feel should match the system menu bar experience as closely as possible.
- The interface should be performant.
- Bug reports are accepted and will be addressed directly if the issue also affects internal teams.
- Feature requests will not be accepted unless the feature is developed by the community. However, community-developed features are subject to discussion and review.
Please open an issue and clearly describe what you are reporting. Check to make sure that there are no existing issues before opening a duplicate.
- Concrete code contributions that make meaningful additions, improvements, or bug fixes are accepted.
- Large scale changes that significantly alter Tophat beyond its current form will not be accepted (e.g. expansion to other operating systems).
Before opening a pull request, check if there are any open issues that are applicable to your changes. For larger changes, consider opening an issue for discussion first.
To build Tophat, you will need at least Xcode 15.0 and macOS 14.0.
- Fork the repo and create a new branch for your changes.
- Ensure that you have Mint installed, either directly or via Homebrew:
brew install mint
- Install Mint dependencies using:
This will allow you to run SwiftLint using
mint bootstrap
mint run swiftlint
. - Before you start a piece of work, ensure that you sync any submodules using:
git submodule update --init --recursive
- Make any changes to Tophat and create commits as needed.
- Add tests, if needed.
- Create a pull request and provide detailed context in the description.
To create a release build of Tophat, use the following steps:
- Create an archive using Product → Archive.
- Select the archive that was created, click Distribute App, then Copy App.