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

Video/media: add metadata to modals #116

Merged
merged 10 commits into from
Oct 20, 2020
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ yarn-debug.log*
yarn-error.log*

# caches
.eslintcache
.eslintcache

# Local Netlify folder
.netlify

# Notes and TODOs, etc.
_NOTES.md
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Languages of New York City Map

[![Netlify Status](https://api.netlify.com/api/v1/badges/1f8bbbc8-4747-415e-bc63-b392256cedd5/deploy-status)](https://app.netlify.com/sites/languagemapping/deploys)

> This project will become an interactive map of New York City’s linguistic
> diversity, using data collected by the Endangered Language Alliance (ELA).
> Users will need to be able to query a rich dataset and interact with the data
Expand Down Expand Up @@ -67,6 +69,23 @@ You should not need to publish the sheet nor set any permissions in order to use
it since you should have full read access to it via the API. If you are getting
any permissions errors though, that would be the first place to check.

### YouTube API

The project is set up to support YouTube embed URLs (for both playlists and
individual videos) and Internet Archive embed URLs. If using YouTube, follow the
same instructions as the Google Sheets API instructions above, but set the
variable name as `REACT_APP_YOUTUBE_API_KEY`.

The API is only used for metadata like title and descriptions. You can still
embed videos without an API key, and Internet Archive's API does not require a
key at all.

### Sentry

TODO: decide how/whether to explain Netlify, Sentry situation. If including
Sentry, need to follow the React steps from their docs. If following same setup
as ours, set the Sentry environment via `REACT_APP_SENTRY_ENVIRONMENT` env var.

## Usage

### Install dependencies
Expand Down
13 changes: 13 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Settings in the [build] context are global and are applied to all contexts
# unless otherwise overridden by more specific contexts.
[build.environment]
REACT_APP_SENTRY_ENVIRONMENT = "production"
SENTRY_ENVIRONMENT = "production"

# Attempt to set Sentry environment for deploy previews. Also set in GH secrets.
[context.deploy-preview.environment]
REACT_APP_SENTRY_ENVIRONMENT = "deploy-preview"
SENTRY_ENVIRONMENT = "deploy-preview"

# TODO: if using route-based code splitting w/cache (???), look into Headers:
# https://docs.netlify.com/configure-builds/file-based-configuration/#headers
2 changes: 1 addition & 1 deletion src/components/details/DetailsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { GlobalContext, LangOrEndoIntro, ScrollToTopOnMount } from 'components'
import { LegendSwatch } from 'components/legend'
import { RecordDescription } from 'components/results'
import { paths as routes } from 'components/config/routes'
import { Media } from 'components/media'
import { useSymbAndLabelState } from '../../context/SymbAndLabelContext'
import { Media } from './Media'
import { useStyles } from './styles'
import { LangRecordSchema } from '../../context/types'

Expand Down
263 changes: 0 additions & 263 deletions src/components/details/Media.tsx

This file was deleted.

Loading