Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ common --experimental_google_legacy_api
build --noincremental_dexing --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64
mobile-install --start=warm

# Cache Config for Build: the cache occassionally becomes corrupted. Comment out this block to disable caching.
# Then build (wait for success), uncomment the block, and build again. This should fix the issue.
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://remote.buildbuddy.io
build --remote_cache=grpcs://remote.buildbuddy.io
Expand Down
107 changes: 10 additions & 97 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,18 @@
# How to Contribute
# Contributing to Player

If you find something interesting you want contribute to the repo, feel free to raise a PR, or open an issue for features you'd like to see added.
Thank you for your interest in contributing to Player!

[For first time contributors](./newCONTRIBUTORS.md)
## πŸ“– Documentation

## Proposing a Change
**Complete contributing documentation lives on our documentation site: πŸ‘‰ [Contributing Guide](https://github.intuit.com/pages/player/docs/latest/contributing/)**

For small bug-fixes, documentation updates, or other trivial changes, feel free to jump straight to submitting a pull request.
## Quick Links

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.

## Requirements

- [bazelisk](https://github.com/bazelbuild/bazelisk)
- [pnpm >= 9.0.0](https://pnpm.io/installation)

- [Swift >= 5.5](https://www.swift.org/download/)
- [Xcode 15.3](https://developer.apple.com/download/all/)

- [Android NDK 27.1.12297006](https://github.com/android/ndk/releases/tag/r27b). You'll need to add `ANDROID_NDK_HOME` to your environment manually. It will look like `export ANDROID_NDK_HOME=/Users/{USERNAME}/Library/Android/sdk/ndk/27.1.12297006`
- Python < 3 (recommended 2.7.18) - you can use [pyenv](https://realpython.com/intro-to-pyenv/) to manage different python versions with ease.

- [Signed Commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). For convenience it is recommended to set git to sign all commits by default as mentioned [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key)

## Building and Testing Locally (All platforms)

> This project also contains [just](https://github.com/casey/just) recipes for many common commands. They can be listed using `just -l`

### Player

For speed and consistency, this repo leverages `bazel` as its main build tool. Check out the [bazel](https://bazel.build/) docs for more info.

After forking the repo, run builds using bazel to test, build and run:

## Docs Sites

These require the [Android NDK](https://developer.android.com/ndk).
The docs site can be run locally using:

```bash
bazel run //docs/site:dev
```

which will run an instance on `http://localhost:4321`.

When a PR is merged, any `docs/site` changes will be deployed to the `next` folder in [https://github.com/player-ui/player-ui.github.io](https://github.com/player-ui/player-ui.github.io), which stores the built files for the site.

The OSS site is deployed with the following route logic:

- The `next` route correlates to the doc site generated by the latest build of Player.
Every PR merged into the main branch (unless opted out) will generate a next build so that functionality can be immediately consumed.
- The `latest` route correlates to the doc site generated from the last non-next release of Player.
These are releases that are we intentionally choose to cut and have a non-tagged semvar version.
- The `0` route contains the docs for the last `0.x.x` release.
For every major release, we preserve the doc site for the last version released for it to allow folks who can't upgrade immediately to still have access to docs that are relevant for them.

## For Android Only Builds

If you are interested in only contributing for android, follow our [android guide](https://github.com/player-ui/player/blob/main/android/demo/README.md)

## For iOS Only Builds

### Xcode Project Generation

Generate the `.xcodeproj` to open and work in Xcode. Builds and tests will be executed through bazel, to ensure behavioral parity.

```bash
bazel run //ios:xcodeproj
open -a Xcode ios/PlayerUI.xcodeproj/
```

### Demo Application

#### Xcode

The first time the Xcode project is generated, the default selected target is `PlayerUI`, for a runnable target select `PlayerUIDemo` to run the demo application in the simulator.

#### Bazel

The demo app can also be built and launched in a simulator from the command line with bazel:

```bash
bazel run //ios/demo:PlayerUIDemo
```

## Submitting a Pull Request

Prior to submitting a pull request, ensure that your fork and branch are up to date with the lastest changes on `main`.

Any new features should have corresponding tests that exercise all code paths, and public symbols should have docstrings at a minimum. For more complex features, adding new documentation pages to the site to help guide users to consume the feature would be preferred.

When you're ready, submit a new pull request to the `main` branch and the team will be notified of the new requested changes. We'll do our best to respond as soon as we can.

## Releases

When a PR is merged, it will generate a `next` release, so something like `0.12.0-next.0` which can then be used in your project. This is done so that you can consume the latest changes without having to wait for a release to be cut.

### Canary Releases

To trigger a canary release, collaborators can add a `/canary` comment to any PR. Note: Canary builds can only be requested by collaborators.
- πŸ› [Report a Bug](https://github.com/player-ui/player/issues/new?assignees=&labels=bug&template=bug_report.md&title=)
- πŸ’‘ [Request a Feature](https://github.com/player-ui/player/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=)
- πŸ”§ [Troubleshooting Guide](https://github.intuit.com/pages/player/docs/latest/contributing/troubleshooting/)
- πŸ’¬ [Join Discussions](https://github.com/player-ui/player/discussions)

---

Inspired by react's [How to Contribute](https://reactjs.org/docs/how-to-contribute.html)
*For the most up-to-date and comprehensive contributing information, please visit our [documentation site](https://github.intuit.com/pages/player/docs/latest/contributing/).*
158 changes: 0 additions & 158 deletions DEV_GUIDE.md

This file was deleted.

67 changes: 0 additions & 67 deletions android/demo/README.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/site/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ export default defineConfig({
},
],
},
{
label: "Contributing",
items: [
{
label: "Contributing",
autogenerate: { directory: "contributing" },
},
],
},
{
label: "Plugins",
items: [
Expand Down
2 changes: 1 addition & 1 deletion docs/site/src/components/Sidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type SidebarEntry = (typeof sidebar)[number];

/** Get the icon for a group. Update the icon names in the array to change the icons associated with a group. */
const getIcon = (index: number) =>
(["seti:video", "puzzle", "setting"] as const)[index];
(["seti:video", "pencil", "puzzle", "setting"] as const)[index];

function getFirstEntry(entry: SidebarEntry) {
if (entry.type === "group") {
Expand Down
Loading