-
Notifications
You must be signed in to change notification settings - Fork 4
Contributing
Currently we aren't accepting issues from people outside the Adevinta Platform to this repo, but you're always welcome to the discussions page.
Latest Xcode installed on your machine
Run xcodegen
inn project repository and .xcproj
file would be generated.
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 by a #spark-dev member and code reviewed by #spark-contributors-ios member.
- If the pull request is accepted, the accepting #spark-dev member will merge the pull request for you.
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.
Code should be covered by tests
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.
If you introduce visible changes, you'll likely have to update screenshots files for the tests to pass. For snapshot testing we are using a sub-directory spark-ios-snapshots.
You should create the same branch in snapshots git repository (e.g. feature/component/componentname in spark-ios and spark-ios-snapshots. The PR will then use the snapshots from this branch while executing the tests.
If there are no available snapshots for your component, running snapshots tests for the first time will create them in subdirectory spark-ios-snapshots
of spark-ios with the name of component.
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>