Now that you have Gaia running on your Desktop and you understand to some level how the codebase works, you should be ready to start contributing to the project. This article describes how to make changes and where to find bugs to work on.
Git best practices
- When making changes to Gaia, you should first Grab the latest from master:
cd path/to/gaia git checkout master git pull upstream master
- Next, check out a new branch to create your fixes on:
git checkout -b my-code-fix
- Finally, go to your
gaia/appsdirectory, and make your changes to the app files there.
Simple code change example
To view code changes:
- Make changes to the Gaia codebase as required, and save the changes.
- Shut down Firefox Mulet, or your simulator running in WebIDE.
- Rebuild your Gaia profile using
- Restart Firefox Mulet, or your simulator running in WebIDE.
Let's do something simple like change the text colour of the clock on the lock screen:
- The best way to find how this style is set is to use the developer tools. Ctrl/right + click on the clock in Firefox Desktop and select Inspect Element from the context menu.
- You can then work out which CSS file to edit —
gaia/apps/system/lockscreen/style/lockscreen.cssin this case — and then make your changes in the CSS styles on the right hand side of the display to get it to the state you want.
- When you are happy with the change, go and make the change in the file directly.
- Next, follow the steps outlined at the start of this section to view your changes.
Limitations of Gaia Firefox Mulet rendering:
- In the Desktop Firefox rendering, the apps are fairly accurate compared to how they work on a real phone, but you may notice some differences here and there.
- Not all device APIs are supported in desktop Firefox; you can find a list of the ones that are enabled in preferences.js.
Where to find bugs to work on
The best way to find Firefox OS bugs to work on is to consult Josh Matthews' Bugs Ahoy app — this pulls in bugs directly from Mozilla's Bugzilla and displays them in an easy to search and browse way. Once you have found a bug that you want to work on, go to its Bugzilla page, enter yourself in the "assigned to" field, and start work, as indicated above.
- When you work on mentored bugs, one of the Gaia core team will monitor your progress and provide help with the code and process. If you are a beginner to the Firefox OS contribution process, signing up for one of these can be helpful. These are indicated in Firefox OS Bugzilla pages by an entry in the "Mentors" field. Bugs Ahoy lists mentored bugs.
- If you are a completely new Bugzilla user, you may not be able to assign yourself to work on a bug. If you can’t, ask the mentor assigned to that bug to assign you if it has one, or just ask in the bug comments otherwise.
- After you have a bit more experience, you should ask someone to give you permission to assign bugs to yourself.
- Another good whiteboard entry to look out for is
[good first bug], if you are a new contributor and want to start with something simple. You can list just good first bugs using http://www.joshmatthews.net/bugsahoy/?b2g=1&simple=1.
- You should save a search for projects you want to contribute to. For example, the following would give you a Gaia Clock app bug search:
- Gaia powerpoints for visual/interaction specifications
- Weekly Gaia meeting Etherpad
- Datazilla: Mozilla's performance test utility