Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
03ac7c7
move movie into its own folder
hawkrives Oct 22, 2017
145a718
update package-lock.json
hawkrives Oct 22, 2017
ff50579
activate the movie view
hawkrives Oct 22, 2017
c2fceca
add type information for the api endpoint
hawkrives Oct 22, 2017
fa39e52
render the movie poster
hawkrives Oct 22, 2017
89bc693
Render the majority of things we care about
drewvolz Oct 23, 2017
17d39a8
Render IMDB link
drewvolz Oct 24, 2017
b335cca
WIP on showings rows
drewvolz Jan 28, 2018
01ef847
Undo these. Shortcut for dev.
drewvolz Jan 28, 2018
5390090
Prettier, remove temp file
drewvolz Jan 28, 2018
5a9c1c8
Prettier once again
drewvolz Jan 28, 2018
f7275d9
Much nicer showings list
drewvolz Jan 28, 2018
dfbc524
move stuff around and fix types
hawkrives Jan 28, 2018
8857e66
recreate index.js
hawkrives Jan 28, 2018
ab4c02e
move movie storage to redux
hawkrives Jan 28, 2018
7d3fd6b
inline property accesses
hawkrives Jan 28, 2018
180e9cf
fix flow type
hawkrives Jan 28, 2018
90ff3e1
clean up the view some more
hawkrives Jan 28, 2018
a16dd02
clean up more of the movie poster
hawkrives Jan 28, 2018
9876480
clean up more of the movie view
hawkrives Jan 28, 2018
64197c3
rename some more style props
hawkrives Jan 28, 2018
90b8d32
add "movie trailers" to the view
hawkrives Jan 28, 2018
8a5a073
wip on the movie view
hawkrives Jan 29, 2018
10b040e
add dep on polished
hawkrives Jan 29, 2018
93e6d23
clean up main card styles
hawkrives Jan 29, 2018
0859abe
clean up styles in Navigation
hawkrives Jan 29, 2018
bee92bf
allow setting default navigationOptions in TabNavigation
hawkrives Jan 29, 2018
f8b3f97
allow passing a tint color to Radio views
hawkrives Jan 29, 2018
7ac65a1
extract navigationOptions for streaming into the index file
hawkrives Jan 29, 2018
55d6adf
work on Movie more
hawkrives Jan 29, 2018
65e594e
update TODOs
hawkrives Jan 29, 2018
f4c8fe4
Combine directors and writers if they are the same people
drewvolz Jan 30, 2018
9c9508e
Return non-cached movie if in development
drewvolz Jan 30, 2018
984247a
Conditionally show writers and directors
drewvolz Jan 30, 2018
ecf84e2
Prettier made some changes
drewvolz Jan 30, 2018
6c1a707
Define the variable
drewvolz Jan 30, 2018
5343256
Horizontal scrolling showtimess
drewvolz Jan 30, 2018
0932264
Functional component from writers/directors
drewvolz Jan 30, 2018
a0e068f
Revert "Return non-cached movie if in development"
drewvolz Jan 30, 2018
4dc806c
Undo type change
drewvolz Jan 30, 2018
870e11f
Move separator outside of list render
drewvolz Feb 1, 2018
02762a1
Touchup no showings styles
drewvolz Feb 1, 2018
905abd1
extract the movie poster into its own component
hawkrives Feb 3, 2018
ff24a0d
clean up some stuff
hawkrives Feb 3, 2018
d0ba128
split the movie view into files
hawkrives Feb 3, 2018
29efb82
continue moving things around
hawkrives Feb 4, 2018
afc97e7
fix remaining flow errors
hawkrives Feb 4, 2018
fd0c891
remove an unused import
hawkrives Feb 4, 2018
d30f854
fix up Showings tiles
hawkrives Feb 4, 2018
3dff27b
group showings together
hawkrives Feb 4, 2018
a607a96
update TODOs
hawkrives Feb 4, 2018
59491fe
give a background color to the dates on the showings
hawkrives Feb 4, 2018
de94ece
Revert "give a background color to the dates on the showings"
hawkrives Feb 4, 2018
368417d
remove card styles from credits block
hawkrives Feb 4, 2018
d0889ed
bold the showing dates
hawkrives Feb 4, 2018
131f594
add headings to the sections
hawkrives Feb 4, 2018
1584f50
begin rendering trailers
hawkrives Feb 4, 2018
3b5ea3d
clean up TrailerBackground a little bit
hawkrives Feb 4, 2018
59a96da
move SectionHeadings into their respective files
hawkrives Feb 4, 2018
45bba13
remove _poster_ tint color from _trailer_ image
hawkrives Feb 4, 2018
859a5c7
make the movie trailer thumbnails look nicer
hawkrives Feb 4, 2018
ffd8b20
Dimension listeners for window reisze
drewvolz Feb 5, 2018
ccf8334
Prettier on trailers
drewvolz Feb 5, 2018
49613bc
fix things
hawkrives Feb 5, 2018
6a4d194
update things for viewport from state
hawkrives Feb 5, 2018
a7e3800
pass viewport
hawkrives Feb 5, 2018
9c471e7
swap SafeAreaView for contentInsetAdjustmentBehavior
hawkrives Feb 5, 2018
063535d
prettify
hawkrives Feb 5, 2018
c4a4e16
update TODOs
hawkrives Feb 5, 2018
4103a59
remove horizontal indicator from showings list
hawkrives Feb 5, 2018
4baed8f
fix type in finding which clips to show
hawkrives Feb 5, 2018
035002c
clean up borderRadius additions
hawkrives Feb 5, 2018
7315910
move scrollview's contentContainerStyle into StyleSheet
hawkrives Feb 5, 2018
945cedb
pass Viewport through the Trailers view
hawkrives Feb 5, 2018
981bc12
convert PosterImage to function
hawkrives Feb 5, 2018
a9db8a0
add ShrinkWhenTouched component
hawkrives Feb 5, 2018
89619ce
open trailer when pressing "play"
hawkrives Feb 5, 2018
62d8b9a
make tapping a trailer open the trailer
hawkrives Feb 5, 2018
39a0ef8
remove custom IMDBlink component
hawkrives Feb 5, 2018
b60d8e9
make the poster shrink when touched
hawkrives Feb 5, 2018
eb4ea2b
update TODOs
hawkrives Feb 5, 2018
cef9dac
clean up movie poster behavior in landscape
hawkrives Feb 5, 2018
55bb828
prettify and update TODOs
hawkrives Feb 5, 2018
4f0a582
allow selecting the movie title
hawkrives Feb 5, 2018
cbd1650
remove contentInsetAdjustmentBehavior
hawkrives Feb 5, 2018
dac98e5
update TODOs
hawkrives Feb 5, 2018
bea22f5
update app config for server changes
hawkrives Feb 5, 2018
2ac8d15
pad sorting date so 09 comes before 10
hawkrives Feb 7, 2018
35d6dfa
add test to ensure grouped showings sort correctly
hawkrives Feb 7, 2018
4931503
tweak top trailer triangle background
hawkrives Feb 7, 2018
cc2260c
use largest thumbnail image for trailers for now
hawkrives Feb 7, 2018
d0d55ba
update list of todos
hawkrives Mar 24, 2018
8c743cc
remove lingering navigation file from rebase
drewvolz Sep 15, 2018
3ee4bca
Fixup imports and lifecycle in movie view
drewvolz Sep 15, 2018
82cee89
new candy colors
drewvolz Sep 15, 2018
9a6749c
unsure about the packages here -- need to double check
drewvolz Sep 15, 2018
702ff95
changes to yarn lock -- double check
drewvolz Sep 15, 2018
c85f9d2
yarn lock changes -double check
drewvolz Sep 15, 2018
0dd4b25
prettier changes to streaming radio, streams, and webcams
drewvolz Sep 15, 2018
8115982
remove default movie view
drewvolz Sep 15, 2018
8ac1086
rename to redux, include movie in redux
drewvolz Sep 15, 2018
0d276cb
fixup imports
drewvolz Sep 15, 2018
b84b081
prettier changes to streaming and navigation
drewvolz Sep 15, 2018
96ab830
convert to new tab navigation
drewvolz Sep 15, 2018
87a293c
pass colors directly and run prettier
drewvolz Sep 15, 2018
55f585e
add background color to card -- it's now needed
drewvolz Sep 15, 2018
58417f6
remove global file and add movie url to constants
drewvolz Sep 15, 2018
9a29965
remove debug console logs from cache
drewvolz Sep 15, 2018
b25ac98
set persistence key back to non-persistence on dev
drewvolz Sep 15, 2018
392f742
increase star font sizes
drewvolz Sep 16, 2018
47764bd
label the ratings for rotten tomatoes and imdb
drewvolz Sep 16, 2018
d7702f5
correct json fetching of movie url
drewvolz Sep 16, 2018
55944ff
find largest thumbnail out of all trailer backgrounds
drewvolz Sep 16, 2018
2ed9dbb
Merge branch 'master' into weekly-movie-drew-hawken-4
drewvolz Mar 29, 2019
eed5dc1
Add polished package
drewvolz Mar 29, 2019
82c3dd1
Add hooks, clean up fragments, add react-async
drewvolz Mar 29, 2019
00d3759
Call all hooks before early exits
drewvolz Mar 29, 2019
0bc214b
Nix package lock, we have a yarn lock
drewvolz Mar 29, 2019
8bfae3b
fix up type assumptions about what gets passed into TrailerBackground
hawkrives Mar 30, 2019
981b42e
simplify findLargestTrailerImage
hawkrives Mar 30, 2019
16cb22e
Layout tweaks to genres, year, and runtime
drewvolz Mar 30, 2019
34c23be
Nix trailer button
drewvolz Mar 30, 2019
6e87399
Split out android and ios credits
drewvolz Apr 5, 2019
7d87e46
Split out android and ios plot
drewvolz Apr 5, 2019
e03dd9a
Set background for ios, use default for android
drewvolz Apr 5, 2019
562c1ec
Rename styles, add elevation and more margin to credits
drewvolz Apr 5, 2019
302ba87
Rename styles, add elevation and more margin to plot
drewvolz Apr 5, 2019
6dbd73b
Extract trailers to platform specific files (no changes yet)
drewvolz Apr 5, 2019
6633bca
use the right platform selector for android
drewvolz Apr 9, 2019
6338e1d
Make trailers, teasers, featurettes, and clips appears as cards
drewvolz Apr 13, 2019
d970f87
remove margin from card content
drewvolz Apr 13, 2019
4cfdf2a
Merge branch 'master' into weekly-movie-drew-hawken-6
rye May 4, 2020
4a1f121
style: Reformat via prettier
rye May 4, 2020
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
79 changes: 79 additions & 0 deletions flow-typed/npm/react-async_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// flow-typed signature: 768314abdaaf874222831e76fc320814
// flow-typed version: <<STUB>>/react-async_v5.1.2/flow_v0.92.1

/**
* This is an autogenerated libdef stub for:
*
* 'react-async'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'react-async' {
import type {Node} from 'react'
import typeof * as React from 'react'

declare export type AsyncChildren<T> =
| ((state: AsyncState<T>) => Node)
| Node
declare export type PromiseFn<T> = (
props: Object,
controller: AbortController,
) => Promise<T>
declare export type DeferFn<T> = (
args: any[],
props: Object,
controller: AbortController,
) => Promise<T>

declare export interface AsyncOptions<T> {
promise?: Promise<T>;
promiseFn?: PromiseFn<T>;
deferFn?: DeferFn<T>;
watch?: any;
watchFn?: (props: Object, prevProps: Object) => any;
initialValue?: T;
onResolve?: (data: T) => void;
onReject?: (error: Error) => void;
// [prop: string]: any;
}

declare export interface AsyncProps<T> extends AsyncOptions<T> {
children?: AsyncChildren<T>;
}

declare export interface AsyncState<T> {
data?: T;
error?: Error;
initialValue?: T;
isLoading: boolean;
startedAt?: Date;
finishedAt?: Date;
counter: number;
cancel: () => void;
run: (...args: any[]) => Promise<T>;
reload: () => void;
setData: (data: T, callback?: () => void) => T;
setError: (error: Error, callback?: () => void) => Error;
}

declare export function useAsync<T>(
arg1: AsyncOptions<T> | PromiseFn<T>,
arg2?: AsyncOptions<T>,
): AsyncState<T>

declare export interface FetchOptions<T> extends AsyncOptions<T> {
defer?: boolean;
json?: boolean;
}

declare export function useFetch<T>(
input: window.RequestInfo,
init?: window.RequestInit,
options?: FetchOptions<T>,
): AsyncState<T>
}
5 changes: 5 additions & 0 deletions modules/colors/candy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @flow

export const candyBlue = '#00ADD9'
export const candyGray = '#E0DAD6'
export const candyLime = '#A3D65C'
1 change: 1 addition & 0 deletions modules/colors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export {firstReadable} from './util'

export * from './colors'
export * from './candy'
export * from './gradients'

export {
Expand Down
16 changes: 16 additions & 0 deletions modules/viewport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,19 @@ export class Viewport extends React.PureComponent<Props, State> {
return this.props.render(this.state.viewport)
}
}

export function useViewport() {
let [window, setWindow] = React.useState(Dimensions.get('window'))

React.useEffect(() => {
function handleResizeEvent(event: {window: WindowDimensions}) {
setWindow(event.window)
}

Dimensions.addEventListener('change', handleResizeEvent)

return () => Dimensions.removeEventListener('change', handleResizeEvent)
})

return window
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"moment-timezone": "0.5.28",
"p-props": "4.0.0",
"p-retry": "4.2.0",
"polished": "3.1.0",
"query-string": "6.12.1",
"querystring": "0.2.0",
"react": "16.9.0",
Expand Down
1 change: 1 addition & 0 deletions source/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

export const GH_BASE_URL = 'https://github.com/StoDevX/AAO-React-Native'
export const GH_NEW_ISSUE_URL = `${GH_BASE_URL}/issues/new`
export const WEEKLY_MOVIE_URL = 'https://stodevx.github.io/sga-weekly-movies'
4 changes: 2 additions & 2 deletions source/views/streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import {TabNavigator} from '../../../modules/navigation-tabs/tabbed-view'

// import WeeklyMovieView from './movie'
import {WeeklyMovieView} from './movie'
import {WebcamsView} from './webcams'
import {StreamListView} from './streams'
import {KstoStationView} from './radio/station-ksto'
Expand All @@ -15,7 +15,7 @@ const StreamingMediaView = TabNavigator({
LiveWebcamsView: {screen: WebcamsView},
KSTORadioView: {screen: KstoStationView},
KRLXRadioView: {screen: KrlxStationView},
// WeeklyMovieView: {screen: WeeklyMovieView},
WeeklyMovieView: {screen: WeeklyMovieView},
})

StreamingMediaView.navigationOptions = {
Expand Down
23 changes: 0 additions & 23 deletions source/views/streaming/movie.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// @flow

import * as React from 'react'
import {StyleSheet} from 'react-native'
import {Card, Subheading, Paragraph} from 'react-native-paper'

type Props = {
directors: string,
writers: string,
actors: string,
}

export const AndroidCredits = ({directors, writers, actors}: Props) => {
return (
<>
{writers === directors ? (
<Card style={styles.card}>
<Card.Title title="Credits" />
<Card.Content style={styles.content}>
<Subheading>Written and Directed By</Subheading>
<Paragraph>{directors}</Paragraph>
</Card.Content>

<Card.Content style={styles.content}>
<Subheading>Cast</Subheading>
<Paragraph>{actors}</Paragraph>
</Card.Content>
</Card>
) : (
<>
<Card style={styles.card}>
<Card.Title title="Credits" />
<Card.Content style={styles.content}>
<Subheading>Directed By</Subheading>
<Paragraph>{directors}</Paragraph>
</Card.Content>

<Card.Content style={styles.content}>
<Subheading>Written By</Subheading>
<Paragraph>{writers}</Paragraph>
</Card.Content>

<Card.Content style={styles.content}>
<Subheading>Cast</Subheading>
<Paragraph>{actors}</Paragraph>
</Card.Content>
</Card>
</>
)}
</>
)
}

const styles = StyleSheet.create({
card: {
elevation: 2,
marginBottom: 10,
marginHorizontal: 10,
},

content: {
marginBottom: 12,
},
})
43 changes: 43 additions & 0 deletions source/views/streaming/movie/components/credits/credits-ios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// @flow

import * as React from 'react'
import {Heading, Text, Padding, SectionHeading} from '../parts'
import {Column} from '@frogpond/layout'

type Props = {
directors: string,
writers: string,
actors: string,
}

export const IosCredits = ({directors, writers, actors}: Props) => {
return (
<>
<SectionHeading>CREDITS</SectionHeading>
<Padding marginTop={4}>
{writers === directors ? (
<Column marginBottom={16}>
<Heading>Written and Directed By</Heading>
<Text>{directors}</Text>
</Column>
) : (
<React.Fragment>
<Column marginBottom={16}>
<Heading>Directed By</Heading>
<Text>{directors}</Text>
</Column>
<Column marginBottom={16}>
<Heading>Written By</Heading>
<Text>{writers}</Text>
</Column>
</React.Fragment>
)}

<Column>
<Heading>Cast</Heading>
<Text>{actors}</Text>
</Column>
</Padding>
</>
)
}
7 changes: 7 additions & 0 deletions source/views/streaming/movie/components/credits/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// @flow

import {Platform} from 'react-native'
import {IosCredits} from './credits-ios'
import {AndroidCredits} from './credits-android'

export const Credits = Platform.OS === 'ios' ? IosCredits : AndroidCredits
18 changes: 18 additions & 0 deletions source/views/streaming/movie/components/genres.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// @flow

import * as React from 'react'
import {Pill} from './pill'
import * as c from '@frogpond/colors'
import glamorous from 'glamorous-native'

export function Genres({genres}: {genres: Array<string>}) {
return (
<glamorous.ScrollView horizontal={true} overflow="hidden">
{genres.map((genre) => (
<Pill key={genre} bgColor={c.candyGray} marginRight={4}>
{genre.toLowerCase()}
</Pill>
))}
</glamorous.ScrollView>
)
}
Loading