Documentation and examples go a long way in helping others learn about Frappe. Building an example yourself can also be a great way to learn about FRP. If you're interested in contributing to our learning material, take a look at some of these ideas.
If you'd like to submit a code change, here are some guidelines to follow:
- If you plan on submitting a transformation method, implement it first as a
StreamTransformerand submit a PR to the stream_transformers package. - All transformation methods should have a unit test that test the following:
- A transformed
EventStreamthat originates from a non-broadcast stream, should return a non-broadcast stream. - A transformed
EventStreamthat originates from a broadcast stream, should return a broadcast stream. - A transformed
Reactableshould return the appropriateReactablesub-class. For example,EventStream.map()should return aEventStreamandProperty.map()should return aProperty. - Cancellation of the last
StreamSubscriptionshould call theonCancelcallback of the sourceStreamController. - The expected forwarding behavior for errors.
- The expected behavior when closing a source stream. For example, closing the source
StreamControllershould call theStreamSubscriptionsonDonecallback in some cases. - The expected transfomed values.
- A transformed
- It's a good idea to run
grind buildbefore submitting a PR. This runs the Dart Analyzer to check for warnings, the linter to check that code adheres to the Dart style guide, and that unit tests pass.