Skip to content

Refactor ControlsPosition in self-hosted video #15738

Merged
domlander merged 2 commits intomainfrom
doml/sh-video-refactor-icons-position
Apr 23, 2026
Merged

Refactor ControlsPosition in self-hosted video #15738
domlander merged 2 commits intomainfrom
doml/sh-video-refactor-icons-position

Conversation

@domlander
Copy link
Copy Markdown
Contributor

@domlander domlander commented Apr 22, 2026

What does this change?

No-op change (except one story).

Renamed controlsPosition to iconsPosition in <SelfHostedVideoPlayer />. Since this prop refers only to the position of the icons, the renaming makes it clearer that the position of the progress bar is unaffected. The progress bar would not have been thought of as a control, but now might be following #15726.

Removes duplicated exports in SelfHostedVideoPlayerIcons. These were unintentionally included during a refactor here.

Inverts a bool for a story.

Why?

Consumers of <SelfHostedVideo /> still only need to specify the condition of the controls. The player component <SelfHostedVideoPlayer /> receives both iconsPosition and subtitlesPosition as these can differ.

@domlander domlander self-assigned this Apr 22, 2026
@domlander domlander added run_chromatic Runs chromatic when label is applied fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature labels Apr 22, 2026
@domlander domlander marked this pull request as ready for review April 22, 2026 13:32
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Apr 22, 2026
* The position of subtitles and the audio icon.
*/
controlsPosition?: 'top' | 'bottom';
controlsPosition?: ControlsPosition;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this type and prop also be renamed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think consumers of this component should still refer to the position of the controls. The position of the subtitles is derived from the position of the controls passed in here.

@domlander domlander merged commit 9682a6c into main Apr 23, 2026
35 checks passed
@domlander domlander deleted the doml/sh-video-refactor-icons-position branch April 23, 2026 08:47
@gu-prout
Copy link
Copy Markdown

gu-prout Bot commented Apr 23, 2026

Seen on PROD (merged by @domlander 9 minutes and 55 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fronts + curation maintenance Departmental tracking: maintenance work, not a fix or a feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants