Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #96

Merged
merged 4 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ For small bug-fixes, documentation updates, or other trivial changes, feel free

If the changes are larger (API design, architecture, etc), [opening an issue](https://github.com/player-ui/player/issues/new/choose) can be helpful to reduce implementation churn as we hash out the design.

## Building and Testing Locally
## Requirements
* [npm >= 8.19.2](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
* [yarn >= 1.22.19](https://yarnpkg.com/)
* [Swift >= 5.2](https://www.swift.org/download/)
* [Android NDK >= 19.2.5345600, <= 21](https://github.com/android/ndk/wiki/Unsupported-Downloads#r19c). Any version > 21 will not work, period. You'll need to add `ANDROID_NDK_HOME` to your environment manually.

For speed and consistency, this repo leverages `bazel` as it's main build tool.
## Building and Testing Locally
### Player
For speed and consistency, this repo leverages `bazel` as it's main build tool. Check out the [bazel](https://bazel.build/) docs for more info.

After forking the repo, run builds using:

Expand All @@ -23,7 +29,16 @@ Tests can also be ran using:
```bash
bazel test //...
```
Check out the [bazel](https://bazel.build/) docs for more info.

### Docs Sites
These require the [Android NDK](https://developer.android.com/ndk).
The docs site can be ran using:

```bash
bazel build //docs/site:start
bazel run //docs/site:start
```
which will run an instance on `http://localhost:3000`.


## Submitting a Pull Request
Expand Down
4 changes: 0 additions & 4 deletions docs/site/components/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ const PlatformTabs = (props: React.PropsWithChildren<unknown>) => {
CodeTabsNameMap.has(c.props.mdxType.toLowerCase())
);

if (!router.isReady) {
Copy link
Member

@KetanReddy KetanReddy Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I am trying to remember the reason for including this but it looks like its not needed anymore.

return <Progress isIndeterminate size="xs" />;
}

const langPrefIndex = children.findIndex(
(c: any) => c.props.mdxType.toLowerCase() === router.query.lang
);
Expand Down
2 changes: 1 addition & 1 deletion docs/site/pages/content/assets-views.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The `id` of the views are used in the navigation section to reference a specific

## Cross-field validation

The other special property of a `view` vs. an `asset` is the addition of a `validation` property on the view. These contains [`validation` objects](../guides/validation) that are used for validations crossing multiple fields, and are ran on user navigation rather than data change.
The other special property of a `view` vs. an `asset` is the addition of a `validation` property on the view. These contain [`validation` objects](/schema) that are used for validations crossing multiple fields, and are ran on user navigation rather than data change.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/site/pages/content/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ State types can also contain `onStart` and `onEnd` properties for evaluating exp

This is the simplest of flows. The navigation begins with executing `FLOW_1`. `FLOW_1` begins with the `VIEW_1` state. `VIEW_1` shows the view with id `view-1`, and any transition from that view goes to `END_1` which completes Player's execution with the `Done` outcome.

![Single Flow Example](https://mockimages.s3-us-west-2.amazonaws.com/docs/simple-flow.png)
![Single Flow Example](/simple-flow.png?darkModeInvert)

### Flow with `onStart` expression

Expand Down
Binary file added docs/site/public/simple-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions docs/storybook/src/Welcome.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import { Meta } from '@storybook/addon-docs';

<Meta title="Welcome" />

<div style={{ display: 'flex', justifyContent: 'center'}}>
<img src="https://ibp-cicd-core.prod1-ibp.a.intuit.com/player/media/latest/logo/large-light.png" alt-text="Player Logo" />
</div>

<br />
![Player Logo](/logo/logo-light-large.png?lightModeOnly)
![Player Logo](/logo/logo-light-large.png?darkModeOnly)

Player is a framework for building cross-platform experiences. The main engine is written in Typescript, with platform specific adapters for iOS, Android, and React (web). It's built from the ground up with plugins in mind to perfectly tailor the experience specifically for your app.

Expand Down