Skip to content

Commit 366ac6f

Browse files
committed
Further contributing updates
1 parent 5396ebf commit 366ac6f

File tree

2 files changed

+31
-24
lines changed

2 files changed

+31
-24
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
1-
##Contributing to the unofficial WWDC app for macOS project
1+
# Contributing to the Unofficial WWDC app for macOS Project
22

33
Thanks for your interest in contributing to the project. Please make sure you follow the guidelines to maximize the chances of your contribution being accepted.
44

5-
##1. Issues
5+
## 1. Issues
66

77
Here are the main reasons you might want to open an issue:
88

9-
####I. Bugs
9+
#### I. Bugs
1010

1111
When the app behaves in an unexpected way or simply breaks, please file a bug report and describe what you were doing when the problem occurred, what was the expected result and what was the actual result.
1212

1313
Remember to include the version of the operating system you're running and the type/model of the machine (MacBook Mid 2009, iMac Late 2012, etc).
1414

15-
####II. Crashes
15+
#### II. Crashes
1616

1717
If you get a crash please open an issue and explain what you were trying to do when the crash happened, include a video or screenshots of the problem if possible.
1818

1919
Remember to include the version of the operating system you're running and the type/model of the machine (MacBook Mid 2009, iMac Late 2012, etc).
2020

21-
####III. Feature Requests
21+
#### III. Feature Requests
2222

2323
If you want a new feature to be implemented, you can open an issue explaining why the feature would be useful to you and to other people.
2424

25-
Keep in mind that we try to keep the app focused and exotic features or features which would add too much complexity to the code may be rejected.
25+
Whilst we want feature requests and suggestions to be as ambitious as possible, keep in mind that we try to keep the app focused, and niche features or features which would add a lot of complexity to the codebase may be rejected. If in doubt, it's better to suggest it than stay silent!
2626

2727
#### Issue template
2828

2929
Please follow the issue template provided when opening your issue, especially if it's a bug report.
3030

31-
##2. Code (Pull Requests)
31+
## 2. Code (Pull Requests)
3232

33-
**Important: pull requests that only contain refactoring of existing code without fixing any bugs, improving performance or implementing a new feature will not be accepted.**
33+
**Important: pull requests that only contain refactoring of existing code without fixing any bugs or linting messages, improving performance or implementing a new feature will not be accepted.**
3434

35-
####I. Tip: Ask before you code
35+
#### I. Tip: Ask before you code
3636

37-
It has happened a couple of times that we were working on a feature and someone opened a pull request implementing that same feature. This wastes time and effort because only one of the solutions will actually be used, so before you start coding I suggest you take a look at the open issues to see what's being worked on at the moment. If an issue already has someone assigned to it, don't start working on an implementation. It's also important to open an issue before working on a new feature if it's not already listed, because not every feature fits our vision of the app and we like to review feature ideas before implementing them.
37+
There have been a couple of times that we were working on a feature and someone opened a pull request implementing that same feature. This wastes time and effort because only one of the solutions can ultimately be used, so before you start coding we suggest you take a look at the open issues to see what's being worked on at the moment. If an issue already has someone assigned to it, don't start working on an implementation. If for some reason it's unclear whether they have made any progress or have time to continue, there's rarely any harm in asking.
3838

39-
If you see an open issue and you want to fix it, reply to the issue announcing that you're going to work on it so other people know there's someone already working on that.
39+
It's also useful to open an issue before working on a new feature if it's not already listed, because not every feature fits our vision of the app and we would rather communicate this before someone spends a significant chunk of time working on it.
4040

41-
####II. Use Swift
41+
If you see an open issue and you want to fix it, reply to the issue announcing that you're going to work on it so other people know there's someone already working on that. Similarly, if you ever need any help or guidance implementing something then adding a new comment to the issue will help us spot it quickly! We're a friendly bunch.
42+
43+
#### II. Use Swift
4244

4345
All new code in the app should be written in Swift using the latest stable version of Xcode.
4446

45-
####III. Use spaces instead of tabs
47+
#### III. Keep indentation and style consistent
4648

47-
Do not start a war over this, I don't even have an opinion about this, I just use spaces because I contributed to some project once and people told me I had to use spaces, so I changed the setting in Xcode and never thought about it again, I have much more important stuff to worry about 🙄
49+
And yes, this means spaces instead of tabs. 😉 It's not worth starting a war over this -- we're not strongly opinionated about it! We just have a clear precedent in the codebase that isn't worth uprooting years into the project -- it simply leads to noisier diffs.
4850

49-
Here's how my Xcode indentation preferences are, please use the same settings when working on this project:
51+
Here's how our Xcode indentation preferences look -- please try to use the same settings when working on the project:
5052

5153
![indentation](screenshots/indentation.png)
5254

53-
####IV. Use `guard` and `return` early whenever possible
55+
#### IV. Use `guard` and `return` early whenever possible
5456

5557
Instead of doing something like this:
5658

@@ -90,7 +92,7 @@ func doSomethingIfNeeded(mustCallThis: (result: String) -> ()) {
9092
}
9193
```
9294

93-
####V. Avoid magic numbers and magic strings
95+
#### V. Avoid magic numbers and magic strings
9496

9597
If you need to reference specific numbers or strings, encapsulate them in `struct`s or `enum`s.
9698

@@ -141,24 +143,29 @@ class ImagesViewController: NSViewController {
141143
}
142144
```
143145

144-
####VI. Test your code thoroughly and follow linting rules
146+
#### VI. Test your code thoroughly and follow linting rules
145147

146148
When you think you're done with your contribution, try to break your code in as many different ways as possible to make sure your implementation is solid:
147149

148-
- If you change something related to the handling of user or application data (model layer) make sure to test the migration of data from a previous version of the app to your modified version.
149-
- If you change a component related to networking, use the network link conditioner and test with a slow/bad connection to see how the app behaves
150+
- If you change something related to the handling of user or application data (model layer) make sure to test the migration of data from a [previous release version of the app](https://github.com/insidegui/WWDC/releases) to your modified version.
151+
- If you change a component related to networking, use Apple's Network Link Conditioner and test with a slow/bad connection to see how the app behaves. This conditioner is available from [`developer.apple.com`](https://developer.apple.com/download/more/), in the "Additional Tools for Xcode" bundle.
150152
- If you change something related to UI, try resizing the window and looking at different content to make sure it can adapt well to different environments.
151153

152-
153154
Make sure your code is not introducing any new warnings, including those produced by Swiftlint.
154155

155-
####VII. Dependencies
156+
#### VII. Dependencies
156157

157-
Do not add dependencies to the project.
158+
Do not add dependencies to the project. In an ideal world, we would be masters of our own destiny.
158159

159160
Do not bring in assets (icons, images) for which you don't have an appropriate license. Icons and images must have a Creative Commons or similar license to be used in this project. A good place to find free icons is [Icon Finder](https://iconfinder.com).
160161

161-
##3. Conclusion
162+
## 3. Conduct
163+
164+
The project has a [code of conduct](./CODE_OF_CONDUCT.md) that should be kept in mind when contributing -- whether that contribution is in the form of issues, comments, documentation or code. We reckon the fact that we've never had to enforce this is a pretty good sign of a healthy community, so let's keep it that way. 😉
165+
166+
Try to keep documentation and messages free of phrases that assume knowledge. If you're resorting to phrases like "obviously", "everyone knows" and "just", there's probably some context you're excluding. Not only does this help us be friendlier and more approachable for newcomers (bear in mind the app itself is an educational resource!), but it will probably help any programmer -- even you! -- who comes back to look at your code in months/years.
167+
168+
## 4. Conclusion
162169

163170
These are just some suggestions for common scenarios, if you need help with your contribution you can always open an issue to discuss it before doing the pull request.
164171

screenshots/indentation.png

408 KB
Loading

0 commit comments

Comments
 (0)