-
Notifications
You must be signed in to change notification settings - Fork 234
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
WSTEAM1-TRANSCRIPT: Front End Changes for Transcript First Video #12201
base: latest
Are you sure you want to change the base?
Changes from 96 commits
f187449
2255797
3929222
acdcbe6
df49ad1
9a11125
b4c3709
d68de51
af89963
a1a75e1
328a686
0a7e90a
0244a53
5f0432a
4d13863
10d67a4
96bf199
f1c2a21
5a87973
14f2bbb
0cdcf3d
e4163cc
18e4b64
98374f7
e51f4c6
801f9d5
7bd1587
134586a
c9e8ef8
1e35f04
317f3a8
ec0f986
f0017a7
d493e12
dfe8d46
0d0e6b2
4167937
b344efc
9ff1160
d7b30bb
4568711
defa588
5c34e8a
126dc18
e6f934f
e565213
edcf5a1
5946c14
ffa0550
001c84d
157c817
3ac2fcb
38c886a
4602361
14439af
f2d20bf
f41d4a5
e66a052
2d8abbd
9a3e76b
44c5eb7
c2fa1e2
327042a
b69d473
0847c22
51297b9
b7d8460
1e36a6a
89eb549
5dbc8f3
bd182b1
6efe03c
9345436
418a046
725b8c1
6258918
f9b83ac
f7c9150
6f5e38e
9ca4af1
9e05727
8ab3978
456228e
2e3e4e4
dde84fd
546f5ef
8bca0a1
d11b1d0
ba4d466
59a9455
b01b69b
7571db6
c00e289
9763f99
52c8e03
0e6672a
d645b19
4b3121b
a72fa44
ea0b63c
80afbcd
5e24754
22dfba8
edd0539
0760c81
e52994a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
*/ | ||
|
||
export const MIN_SIZE = 673 - 5; | ||
export const MAX_SIZE = 1200 + 5; | ||
export const MAX_SIZE = 1212 + 5; |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,17 +1,22 @@ | ||||||||||||||
/** @jsx jsx */ | ||||||||||||||
import { jsx } from '@emotion/react'; | ||||||||||||||
import { Stages } from '#app/hooks/useExperimentHook'; | ||||||||||||||
import SignPost from '#app/components/TranscriptExperiment/SignPost'; | ||||||||||||||
import SignPostNoJs from '#app/components/TranscriptExperiment/SignPostNoJs'; | ||||||||||||||
import Image from '../../Image'; | ||||||||||||||
import styles from './index.styles'; | ||||||||||||||
import PlayButton from './PlayButton'; | ||||||||||||||
import Guidance from './Guidance'; | ||||||||||||||
import { MediaInfo } from '../types'; | ||||||||||||||
import MediaIndicator from '../../TranscriptExperiment/MediaIndicator'; | ||||||||||||||
|
||||||||||||||
interface Props { | ||||||||||||||
onClick: React.MouseEventHandler<HTMLDivElement>; | ||||||||||||||
src?: string; | ||||||||||||||
srcSet?: string; | ||||||||||||||
mediaInfo?: MediaInfo; | ||||||||||||||
noJsMessage?: string; | ||||||||||||||
experimentStage?: Stages; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
const MediaPlayerPlaceholder = ({ | ||||||||||||||
|
@@ -20,6 +25,7 @@ const MediaPlayerPlaceholder = ({ | |||||||||||||
srcSet, | ||||||||||||||
mediaInfo, | ||||||||||||||
noJsMessage = '', | ||||||||||||||
experimentStage = Stages.STAGE_3, | ||||||||||||||
}: Props) => { | ||||||||||||||
const { | ||||||||||||||
title, | ||||||||||||||
|
@@ -30,31 +36,54 @@ const MediaPlayerPlaceholder = ({ | |||||||||||||
guidanceMessage, | ||||||||||||||
} = mediaInfo ?? {}; | ||||||||||||||
|
||||||||||||||
const playButton = ( | ||||||||||||||
<PlayButton | ||||||||||||||
css={styles.playButton} | ||||||||||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||||||||||||||
onClick={() => {}} | ||||||||||||||
title={title} | ||||||||||||||
datetime={datetime} | ||||||||||||||
duration={duration} | ||||||||||||||
durationSpoken={durationSpoken} | ||||||||||||||
type={type} | ||||||||||||||
guidanceMessage={guidanceMessage} | ||||||||||||||
className="focusIndicatorRemove" | ||||||||||||||
/> | ||||||||||||||
); | ||||||||||||||
|
||||||||||||||
const experimentPlayButton = ( | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use
|
||||||||||||||
<MediaIndicator | ||||||||||||||
title={title} | ||||||||||||||
datetime={datetime} | ||||||||||||||
duration={duration} | ||||||||||||||
durationSpoken={durationSpoken} | ||||||||||||||
type={type} | ||||||||||||||
guidanceMessage={guidanceMessage} | ||||||||||||||
/> | ||||||||||||||
); | ||||||||||||||
|
||||||||||||||
const guideComponent = ( | ||||||||||||||
<Guidance | ||||||||||||||
css={styles.guidance} | ||||||||||||||
guidanceMessage={guidanceMessage} | ||||||||||||||
noJsMessage={noJsMessage} | ||||||||||||||
/> | ||||||||||||||
); | ||||||||||||||
|
||||||||||||||
const experimentSignPost = <SignPost title={title} />; | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the signpost component? Can we give it a better name (and remove experiment)? |
||||||||||||||
|
||||||||||||||
return ( | ||||||||||||||
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions | ||||||||||||||
<div | ||||||||||||||
onClick={onClick} | ||||||||||||||
css={styles.placeholder} | ||||||||||||||
data-e2e="media-loader__placeholder" | ||||||||||||||
className="placeholder" | ||||||||||||||
> | ||||||||||||||
<Guidance | ||||||||||||||
css={styles.guidance} | ||||||||||||||
guidanceMessage={guidanceMessage} | ||||||||||||||
noJsMessage={noJsMessage} | ||||||||||||||
/> | ||||||||||||||
<PlayButton | ||||||||||||||
css={styles.playButton} | ||||||||||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||||||||||||||
onClick={() => {}} | ||||||||||||||
title={title} | ||||||||||||||
datetime={datetime} | ||||||||||||||
duration={duration} | ||||||||||||||
durationSpoken={durationSpoken} | ||||||||||||||
type={type} | ||||||||||||||
guidanceMessage={guidanceMessage} | ||||||||||||||
className="focusIndicatorRemove" | ||||||||||||||
/> | ||||||||||||||
|
||||||||||||||
{experimentStage === Stages.STAGE_3 ? guideComponent : null} | ||||||||||||||
{experimentStage === Stages.STAGE_2 ? experimentPlayButton : playButton} | ||||||||||||||
{experimentStage === Stages.STAGE_2 ? experimentSignPost : null} | ||||||||||||||
Comment on lines
+83
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reorder stages numerically
Suggested change
|
||||||||||||||
<SignPostNoJs noJsMessage={noJsMessage} /> | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we name this component something other than SignPostNoJS? What exactly is it? |
||||||||||||||
<Image alt="" src={src} srcSet={srcSet} /> | ||||||||||||||
</div> | ||||||||||||||
); | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we planning to run this as an experiment? Or can we use the word
transcript
instead?