-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/jwplayer/ott-web-app int…
…o feat/custom-reg-fields
- Loading branch information
Showing
160 changed files
with
1,869 additions
and
1,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Create Release Candidate Branch | ||
|
||
# Triggered manually | ||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
create-release-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.ACTION_TOKEN }} | ||
ref: release | ||
# It would be easier to create the branch from develop, | ||
# but unfortunately the script that creates the PR's only considers commits added during the action run | ||
- name: Merge latest from develop | ||
run: | | ||
git config --global user.name 'Release Script' | ||
git config --global user.email 'ott-release-script@jwplayer.com' | ||
git fetch origin develop | ||
git merge origin/develop | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v3 | ||
with: | ||
github-token: ${{ secrets.ACTION_TOKEN }} | ||
release-count: 0 | ||
skip-tag: true | ||
git-push: false | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.ACTION_TOKEN }} | ||
title: ${{ steps.changelog.outputs.tag }} Release Candidate | ||
base: release | ||
branch: release-candidate | ||
body: ${{ steps.changelog.outputs.clean_changelog }} | ||
labels: release-candidate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
name: 'Firebase Preview' | ||
name: Preview and Lighthouse | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'develop', 'feat/*', 'feature/*' ] | ||
branches: ['develop', 'feat/*', 'feature/*', 'release'] | ||
|
||
jobs: | ||
build_and_preview: | ||
name: Build and preview | ||
runs-on: ubuntu-latest | ||
outputs: | ||
output1: ${{ steps.firebase_hosting_preview.outputs.details_url }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
- name: Build Preview Link | ||
env: | ||
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }} | ||
run: yarn && MODE=preview yarn build | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
id: firebase_hosting_preview | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' | ||
expires: 30d | ||
|
||
lhci: | ||
name: Lighthouse | ||
runs-on: ubuntu-latest | ||
needs: build_and_preview | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Lighthouse CI | ||
run: sudo yarn global add @lhci/cli@0.12.x | ||
- name: Run Lighthouse CI | ||
run: lhci autorun --collect.url=${{ needs.build_and_preview.outputs.output1 }}?app-config=gnnuzabk --config=./lighthouserc.js |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ yarn-error.log | |
.firebase | ||
firebase-debug.log | ||
.stylelintcache | ||
.lighthouseci | ||
|
||
# os or editor | ||
.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# What are content types? | ||
|
||
In order to map data coming from the JWP delivery pipeline to the correct screen components in the app, | ||
we use the concept of 'content types'. | ||
Basically, a content type is simply a custom parameter named 'contentType' on a media item with a value defining which type the media is (movie, trailer, series, etc.) | ||
|
||
In the app, content types often map to specific screens (see [screenMapping.ts](src/screenMapping.ts) and [MediaScreenRouter.tsx](src/pages/ScreenRouting/MediaScreenRouter.tsx).) | ||
Each content type screen often expects different metadata attached to the media item's custom parameters. | ||
|
||
# Using content types in the JWP dashboard | ||
|
||
To help ensure that content editors use the right content types and custom parameters, the JWP dashboard has a content type feature. | ||
You can upload the schema for the content types that your app expects. | ||
Content editors will then be able to choose a content type for each media item and will see the expected metadata when they are editing the item on the dashboard. | ||
|
||
> Note: Content types on the JWP dashboard requires a specific entitlement. Please speak with your account rep to enable this feature for your account. | ||
## Uploading content types to the dashboard | ||
|
||
In order to quickly upload the content types, you can use the yarn script included with this repository as so: | ||
|
||
`yarn load-content-types --site-id=<site id>` | ||
|
||
By default, the script will load the content types that the vanilla web app expects found in [content-types.json](scripts/content-types/content-types.json). | ||
You can modify this file in your fork of the web app code or optionally specify another file to load by adding a `--source-file=<file path>` param to the yarn script call. | ||
|
||
### Content type upload file definition | ||
|
||
The upload file should be a json property with the schemas defined as an array on the `schemas` property on the root object. | ||
Please refer to [content-types.json](scripts/content-types/content-types.json) and the JWP documentation for the schema format. | ||
|
||
To avoid unnecessary duplication the file also allows some basic abstraction. | ||
You can define reused fields and sections as key-value entries on the `fields` and `sections` properties respectively. | ||
Then you can include these reusable entities by putting their string key into schemas the same way that you would for inline fields or sections. | ||
There are many examples in the included [content-types.json](scripts/content-types/content-types.json) | ||
|
||
> Note: Although the upload file allows you to define reused fields and sections, when these are uploaded they become distinct copies for each instance in the schemas where they are used. | ||
> That means that changing fields and sections via the api after they are uploaded must be done individually for each schema. | ||
> Alternatively, you can re-upload and overwrite the existing schemas, but use caution because you will lose any other manual changes you have made. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
module.exports = { | ||
ci: { | ||
collect: { | ||
url: ['http://127.0.0.1:4000'], | ||
startServerCommand: 'http-server ./build -p 4000 -g', | ||
startServerReadyPattern: 'Available on', | ||
numberOfRuns: 1, | ||
numberOfRuns: 3, | ||
}, | ||
upload: { | ||
target: 'temporary-public-storage', | ||
}, | ||
assert: { | ||
preset: 'lighthouse:no-pwa', | ||
assertions: { | ||
'categories:performance': ['warn', { minScore: 0.9 }], | ||
'categories:seo': ['error', { minScore: 0.9 }], | ||
'categories:accessibility': ['warn', { minScore: 0.9 }], | ||
'categories:best-practices': ['warn', { minScore: 0.9 }], | ||
'categories:pwa': ['warn', { minScore: 0.9 }], | ||
}, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.