Skip to content

Commit 96363d8

Browse files
Merge pull request #2812 from StephenHodgson/vNEXT-FeatureProcessDocumentation
Feature process documentation and contribution update
2 parents 7bf7107 + 1e68879 commit 96363d8

File tree

3 files changed

+182
-39
lines changed

3 files changed

+182
-39
lines changed

CONTRIBUTING.md

Lines changed: 75 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,106 @@
11
# Contributing
22

3-
The Mixed Reality Toolkit welcomes contributions from the community.
4-
If you have any questions, please reach out on the [HoloLens forums](https://forums.hololens.com/).
3+
The Mixed Reality Toolkit (MRTK) welcomes contributions from the community. Whether it is for a minor change like fixing typos and small bug fixes, or a new feature or component.
54

6-
# Process
5+
For larger submissions, we have drafted contribution guidelines to ensure a smooth process and a good quality of code and documentation, so please be sure to review the [Feature Contribution guidelines / Process](./Feature_Contribution_Process.md).
76

8-
1. [Make a proposal](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues)
9-
- If you are implementing something from our backlog, you do not need to file a new proposal.
10-
2. Implement the change, including any needed demo scenes and/or unit tests.
11-
3. Start a pull request & address comments.
12-
4. Merge.
7+
All changes be they small or large, need to adhere to the [MRTK Coding Standards](/CodingGuidelines.md), so please ensure you are familiar with these while developing to avoid delays when the change is being reviewed.
138

14-
# Proposal
9+
If you have any questions, please reach out on the [HoloLens forums](https://forums.hololens.com/) or the [HoloDevelopers slack](https://holodevelopers.slack.com/).
1510

16-
For things like fixing typos and small bug fixes, you can skip this step.
11+
# Submission process
12+
We provide several paths to enable developers to contribute to the Mixed Reality Toolkit, all starting with [creating a new Issue](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/new/choose)
1713

18-
If your change is more than a simple fix, please don't just create a big pull request.
19-
Instead, start by [opening an issue](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues) describing the problem you want to solve and how you plan to approach the problem.
20-
This will let us have a brief discussion about the problem and, hopefully, identify some potential pitfalls before too much time is spent.
14+
![](External/ReadMeImages/issue_selection_prompt.png)
2115

22-
Note: If you wish to work on something that already exists on our backlog, you can use that work item as your proposal.
16+
From here you can either:
2317

24-
# Implementation
18+
* **Open a new issue** - telling of us a bug or issue with the project you are facing.
19+
> We recommend discussing issues in the [HoloDevelopers slack](https://holodevelopers.slack.com/) channel first to ensure it's an issue with the MRTK.
20+
21+
* **Raise a new Feature request** - some missing feature that you really need, or have even implemented your self that you would like to see added to the project
22+
23+
* **Create a new Task for the Mixed Reality vNext project** - defining a new feature or component for the next generation of the Mixed Reality Toolkit
24+
25+
26+
# Creating proposals
27+
28+
To ensure a smooth process when contributing new fixes or features, it's key that you start your journey by creating one of the issue types listed above.
29+
30+
Start by [opening a proposal](https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/new/choose) describing the change you want to make and how your proposed implementation, or simply the issue you are facing. This will enable us have a brief discussion about the proposal and, hopefully, identify some potential pitfalls before any work is started.
31+
32+
If you're proposing a completely new feature (or a new platform support) please follow the [Feature Contribution Process](./Feature_Contribution_Process.md).
33+
34+
>Note: If you wish to work on something that already exists on our backlog, you can use that work item as your proposal. Be sure to also comment on the task notifying maintainers that you're working towards completing it.
35+
36+
# Beginning development
37+
Working with Git, the contribution process is quite simple (provided you have installed a good Git Client such as TortoiseGit or SourceTree)
38+
39+
> If you are new to to the Git workflow, [check out this tutorial on Pluralsight](https://www.pluralsight.com/blog/software-development/github-tutorial)
40+
41+
To get started, simply follow these steps
2542

2643
1. Fork the repository. Click on the "Fork" button on the top right of the page and follow the flow.
2744
2. Create a branch in your fork (off of the [mrtk_development](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/mrtk_development) branch) to make it easier for you to isolate your fork.
45+
> for the legacy HoloToolkit use the [htk_development](https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/htk_development) branch
2846
3. Instructions for getting the project building and running the tests are in the [README](README.md).
29-
4. Make small and frequent commits that include tests which could be a unity scene showing usage of your feature.
47+
4. Make **small and frequent** commits that include tests which could be a unity scene showing usage of your feature.
3048
5. Make sure that all the tests continue to pass.
3149
6. Follow the [Coding Guidelines](/CodingGuidelines.md).
3250
7. Ensure the code and feature(s) are documented as describred in the [Documentation Guidelines](/DocumentationGuidelines.md).
3351
8. Ensure the code works as intended on all [platforms](#supported-platforms).
3452
- For Windows UWP projects, your code must be [WACK compliant](https://developer.microsoft.com/en-us/windows/develop/app-certification-kit). To do this, generate a Visual Studio solution, right click on project; Store -> Create App Packages. Follow the prompts and run WACK tests. Make sure they all succeed.
3553
9. Update the [documentation](#update-documentation) with additional information as needed.
3654

37-
## Update Documentation
38-
39-
The Mixed Reality Toolkit provides the following forms of documentation.
4055

41-
- API
42-
This documentation is generated from the product code and is reviewed as part of **all** pull requests.
43-
- Conceptual
44-
Conceptual documentation is hosted on https://docs.microsoft.com/en-us/windows/mixed-reality. Please submit our changes via Pull Request at https://github.com/MicrosoftDocs/mixed-reality.
45-
- Readme.md files
46-
As part of your pull request, please update (or create) the Readme.md file in the appropriate feature folder. This will allow GitHub users to gain a high-level understanding of your new feature.
47-
48-
## Supported Platforms
49-
50-
The Mixed Reality Toolkit supports the following mixed reality (AR/VR/XR) platforms.
51-
52-
- Windows Mixed Reality
53-
- Immersive devices
54-
- Microsoft HoloLens
55-
- OpenVR
5656

5757
# Pull request
58-
59-
Start a GitHub pull request to merge your topic branch into the [mrtk_development](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/mrtk_development) branch.
60-
> If you are a Microsoft employee and are not a member of the [Microsoft organization on GitHub](https://github.com/Microsoft), please link your Microsoft and GitHub accounts on corpnet by visiting [Open Source at Microsoft](https://opensource.microsoft.com/) before you start your pull request. There's some process stuff you'll need to do ahead of time.
58+
Once you have created your change, it's time to submit a Pull Request (PR) back to the project. Please ensure all PR's are small and concise, DO NOT include other files / changes not related to the subject of the PR
59+
> e.g. Don't update the *projectversion.txt* when you are making changes or adding a button
6160
6261
If you haven't contributed to a Microsoft project before, you may be asked to sign a [contribution license agreement](https://cla.microsoft.com/).
6362
A comment in the PR will let you know if you do.
6463

64+
> If you are a Microsoft employee and are not a member of the [Microsoft organization on GitHub](https://github.com/Microsoft), please link your Microsoft and GitHub accounts on corpnet by visiting [Open Source at Microsoft](https://opensource.microsoft.com/) before you start your pull request. There's some process stuff you'll need to do ahead of time.
65+
66+
When you are ready:
67+
* Start a GitHub pull request to merge your topic branch targetting the [mrtk_development](https://github.com/microsoft/mixedrealitytoolkit-unity/tree/mrtk_development) branch.
68+
* Ensure you fill in all details required by the Pull Request template, ensuring you reference any Issue / Feature Request or Task the PR relates to.
69+
* Validate that you are only checking in files / changes related to the PR
70+
* Check your documentation is up to date and included (unless submitted in a previous PR)
71+
72+
6573
The project maintainers will review your changes. We aim to review all changes within three business days.
66-
Address any review comments, push to your topic branch, and post a comment letting us know that there's new stuff to review.
74+
Please address any review comments, push to your topic branch, and post a comment letting us know that there's new stuff to review.
75+
> All PR's submitted to the project will also be vetted according to the [MRTK coding standards guide](./CodingGuidelines.md), so please review these before submitting your PR to ensure a smooth process.
6776
6877
# Merge
6978

70-
If the pull request review goes well, a project maintainer will merge your changes. Thank you for helping improve the Mixed Reality Toolkit!
79+
If the pull request review goes well, a project maintainer will merge your changes. Thank you for helping improve the Mixed Reality Toolkit!
80+
81+
# Documentation Requirements
82+
83+
The Mixed Reality Toolkit requires the following forms of documentation for any new feature or component. Also ensure if you are simply patching / fixing an existing feature that the documentation is also updated to match.
84+
85+
### APIs
86+
87+
This documentation is generated from the product code and is reviewed as part of **all** pull requests.
88+
89+
### Conceptual
90+
91+
Conceptual documentation is hosted on https://docs.microsoft.com/en-us/windows/mixed-reality. Please submit your changes via Pull Request at https://github.com/MicrosoftDocs/mixed-reality.
92+
93+
### Readme files
94+
95+
As part of your pull request, please update (or create) the Readme markdown file in the appropriate feature folder. This will allow GitHub users to gain a high-level understanding of your new feature.
96+
97+
## Supported Platforms
98+
99+
The Mixed Reality Toolkit supports the following mixed reality (AR/VR/XR) platforms:
100+
101+
- Windows Standalone
102+
- OpenVR
103+
- Universal Windows Platform
104+
- Standalone PC
105+
- Windows Mixed Reality Immersive devices
106+
- Microsoft HoloLens
21.3 KB
Loading

Feature_Contribution_Process.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Feature Contribution Process
2+
3+
Adding features to the Mixed Reality Toolkit (MRTK) is split up into a few iteration steps, so maintainers can have time to review and and ensure the process goes smoothly. Please be sure to review the list of [feature requirements](#new-feature-requirements) before you get started.
4+
5+
# Process
6+
The following process has been drafted to ensure all new work complies to the updated standards and architecture defined for the MRTK, this has been defined as:
7+
8+
1. [Open a new Proposal and related Tasks](#new-proposal)
9+
2. [Submit an Architecture Draft or Outline](#architecture-draft)
10+
3. [Review and finalize the Architecture documentation](#architecture-documentation)
11+
4. [Submit a PR implementing the Core feature interfaces and event datum (if applicable)](#core-implementation)
12+
5. [Submit a PR Implementing any required SDK components](#sdk-implementation)
13+
6. [Submit a PR Implementing feature demos or full scale Examples](#example-implementation)
14+
15+
## New Proposal
16+
17+
Start by opening a new Proposal or Task describing the feature or the problem you want to solve. Describe the approach and how it fits into the version of the Mixed Reality Toolkit you're targeting. This will enable everyone have a discussion about the proposal and, hopefully, identify some potential pitfalls before any work is started.
18+
19+
New Proposals will be reviewed and discussed during our weekly ship room meetings and if a proposal is accepted, supplemental tasks will then be created and assigned.
20+
21+
## Architecture Draft
22+
23+
The first task once the initial proposal has been accepted, will be to draft the initial architecture document for the feature or work to be done. This document should typically be one or two pages long and include a high level overview of the feature and how it will relate to other parts of the Mixed Reality Toolkit.
24+
25+
* The draft must be easy to consume with key areas highlighted.
26+
* The draft must include a list of the proposed core interfaces, configuration profiles, and event datum.
27+
* The draft must include a simple graphic of the proposed architecture.
28+
29+
Ensure that the architecture of the feature complies with the [New Feature Requirements](#new-feature-requirements) set out by the Core MRTK architecture.
30+
31+
>TODO: Add link to architecture draft template
32+
33+
Once the draft is completed, this can be appended to the Proposal / Task issue on GitHub for final public review.
34+
35+
## Architecture Documentation
36+
37+
Once the draft architecture is accepted, additional pull requests can be made to submit the final full architecture documents to the repository.
38+
39+
>TODO: Add link to the full architecture template
40+
41+
Once the architecture document is approved, only then can the first code submissions can be made.
42+
43+
Development can begin in your own private branch and complete as normal, however, the PR's submitted back to the core MRTK project should be submitted in stages to ensure the review and approval is as smooth as it can be (and ensure core changes do not impact other features)
44+
45+
## Core Implementation
46+
47+
The initial work that should be submitted, is to implement:
48+
49+
* Definitions
50+
* Interfaces
51+
* Configuration profiles
52+
* Event data
53+
54+
> If needed, the architectural document can be updated to align with any changes to the implementation.
55+
56+
Please ensure that all existing Unit Tests and any new tests are all passing prior to submission.
57+
58+
## SDK Implementation
59+
60+
Once the core interfaces and events are merged in to development, work can then be submitted for the SDK components. Adding the concrete implementation of the feature and testing against the supported platforms and unit tests.
61+
62+
## Example Implementation
63+
64+
Once the SDK components are merged, then any demo scenes or updates to the example scenes can be submitted.
65+
66+
* Demos are for specific feature highlighting and demonstration
67+
* Examples are full working scene learning examples
68+
69+
# New Feature Requirements
70+
71+
Most feature implementations can be broken down into 3 main parts:
72+
73+
1. [The Feature Manager](#manager-implementation-requirements)
74+
2. [The Event Data](#event-data-implementation-requirements) (Optional)
75+
3. [The Feature Handler](#handler-implementation-requirements) (Optional)
76+
77+
## Manager Implementation Requirements
78+
79+
* Assembly Definitions for code outside of the `MixedRealityToolkit/_Core` folder.
80+
* This ensures features are self-contained and have no dependencies to other features.
81+
* This only applies to `MixedRealityToolkit` folder.
82+
* Be defined using an interface found in `MixedRealityToolkit/_Core/definitions/<FeatureName>System`.
83+
* A feature's concrete manager implementation should inherit directly from `BaseManager` or `MixedRealityEventManager` if they will raise events.
84+
* A feature's concrete manager implementation should setup and verify scene is ready for that system to use in `Initialize`.
85+
* A feature's concrete manager should also clean up after themselves removing anything created in the scene in `Destroy`.
86+
* Be registered with the Mixed Reality Manager.
87+
* If the feature is a core feature, this should be hard coded into the `MixedRealityManager` and added to the `MixedRealityConfigurationProfile`.
88+
* This includes being able to specify a concrete implementation via dropdown using `SystemType`.
89+
* Features should have a configuration profile that derives from a scriptable object.
90+
* A default configuration profile located in `MixedRealityToolkit-SDK/Profiles` and be assigned in the default configuration profile for the Mixed Reality Manager
91+
* If this feature is **not** a core feature, then it must be registered using the component configuration profile and implement `IMixedRealityComponent`.
92+
* Have a default implementation located in `MixedRealityToolkit-SDK/Features/<FeatureName>`
93+
* Events that can be raised with the system should be defined in the interface, with all the required parameters for initializing the event data.
94+
95+
## Event Data Implementation Requirements
96+
The Event Data defines exactly what data the handler is expected to receive from the event.
97+
98+
* All Event Datum for the feature should be defined in `MixedRealityToolkit/_Core/EventDatum/<FeatureName>`.
99+
* All new Event Data classes should inherit from `GenericBaseEventData`
100+
101+
## Handler Implementation Requirements
102+
103+
The Handler Interface defines each event a component should be listening for and the types of data passed. End users will implement the interface to execute logic based on the event data received.
104+
105+
* Handler interfaces should be defined in `MixedRealityToolkit/_Core/Interfaces/<FeatureName>System/Handlers`.
106+
* Handler interfaces should inherit from `UnityEngine.EventSystems.IEventSystemHandler`
107+
* Opt-in by default. To receive events from the system, the handler will need to register itself with the system to receive those events.

0 commit comments

Comments
 (0)