Contributing - leboncoin/spark-ios GitHub Wiki
Issues, Bugs, Feature or Component Requests
Currently we aren't accepting issues from people outside the Leboncoin Platform to this repo, but you're always welcome to the discussions page.
If you're part of the Leboncoin Platform
Requirements
Latest Xcode installed on your machine
Run xcodegen
inn project repository and .xcproj
file would be generated.
Pull Requests
The best way to make an impact is by creating code submissions called pull requests. Pull requests should be a solution to Github issues.
To make a pull request:
- Make sure there’s a GitHub issue for the change you’re proposing.
- Fork the repo for the platform your code works in.
- Write code in your fork, on a branch if you plan to make multiple changes.
- Create a pull request to merge your branch’s contributions into the corresponding Spark repo.
- The pull request will be triaged and reviewed by a #spark--ios-dev member.
- If the pull request is accepted, the accepting #spark-dev member will merge the pull request for you.
What if I already made a pull request but want to add more commits?
If you correctly created a new branch for your changes, you can simply upload the new commits to your fork and they will automatically appear in the PR.
Testing
Code should be covered by tests
Mocking
For mocking we are using sourcery. This tool creates mocks for our protocols you've marked with // sourcery: AutoMockable
.
For example:
// sourcery: AutoMockable
protocol YourProtocolName {
func yourFunc()
}
Running sourcery will create class YorProtocolGeneratedMock: YourProtocolName
which could be used in testing.
To do so, just run sourcery
command in root of the project.
Snapshot Testing
If you introduce visible changes, you'll likely have to update screenshots files for the tests to pass on each components repositories.
Documentation writing
Here you will find a template to write documentation for component. Please follow it.
# <Name of the component>
## Usage:
If component is available in different implementation and/or interface toolkits (UIKit/SwiftUI), could you please divide usage?
In case if component has the same init and default properties for different toolkits — feel free to merge them into one section.
### <ComponentUIView>
Parameters: here you could list parameters required for initialization.
Default values: here you could provide parameters that are set by default and not listed in init method.
Modifiers: here you could list modifiers available for view to edit default parameters if applicable.
### <ComponentView>
Parameters: here you could list parameters required for initialization.
Default values: here you could provide parameters that are set by default and not listed in init method.
Modifiers: here you could list modifiers available for view to edit default parameters if applicable.
### <ComponentUIGroupView>
Parameters: here you could list parameters required for initialization.
Default values: here you could provide parameters that are set by default and not listed in init method.
Modifiers: here you could list modifiers available for view to edit default parameters if applicable.
### <ComponentGroupView>
Parameters: here you could list parameters required for initialization.
Default values: here you could provide parameters that are set by default and not listed in init method.
Modifiers: here you could list modifiers available for view to edit default parameters if applicable.
## Examples
### <ComponentUIView>
<Code snippet of usage>
### <ComponentView>
<Code snippet of usage>
### <ComponentUIGroupView>
<Code snippet of usage>