Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Fix cursor on placeholder for no-js #2806

Merged
merged 7 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions packages/components/psammead-media-player/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| 2.4.2 | [PR#2806](https://github.com/bbc/psammead/pull/2806) Fix StyledPlaceholder cursor when Javascript is disabled |
| 2.4.1 | [PR#2773](https://github.com/bbc/psammead/pull/2773) Resolve warnings while running unit test |
| 2.4.0 | [PR#2662](https://github.com/bbc/psammead/pull/2662) Add no JS fallback & `noJsClassName` prop to Canonical MediaPlayer |
| 2.3.8 | [PR#2708](https://github.com/bbc/psammead/pull/2708) Talos - Bump Dependencies - @bbc/psammead-play-button |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/psammead-media-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-media-player",
"version": "2.4.1",
"version": "2.4.2",
"description": "Provides a media player with optional placeholder",
"main": "dist/index.js",
"module": "esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ exports[`Media Player: Placeholder should render a video placeholder 1`] = `
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c5 {
Expand Down Expand Up @@ -254,12 +254,12 @@ exports[`Media Player: Placeholder should render a video placeholder with guidan
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c6 {
Expand Down Expand Up @@ -432,12 +432,12 @@ exports[`Media Player: Placeholder should render a video placeholder without dur
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c5 {
Expand Down Expand Up @@ -585,12 +585,12 @@ exports[`Media Player: Placeholder should render an audio placeholder 1`] = `
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c5 {
Expand Down Expand Up @@ -742,12 +742,12 @@ exports[`Media Player: Placeholder should render an audio placeholder without du
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c5 {
Expand Down Expand Up @@ -913,12 +913,12 @@ exports[`Media Player: Placeholder should render no-js styles when noJsClassName
}

.c1 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: default;
}

.c0:hover .c12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { C_POSTBOX } from '@bbc/psammead-styles/colours';
import Guidance from '../Guidance';

const StyledPlaceholder = styled.div`
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
${({ noJsClassName }) => `cursor: ${noJsClassName ? 'default' : 'pointer'};`}
`;

const StyledPlayButton = styled(PlayButton)`
Expand Down Expand Up @@ -53,7 +53,7 @@ const Placeholder = ({
} = mediaInfo;

return (
<StyledPlaceholder onClick={onClick}>
<StyledPlaceholder onClick={onClick} noJsClassName={noJsClassName}>
<Guidance
service={service}
guidanceMessage={guidanceMessage}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ exports[`Media Player: Canonical Entry renders a landscape container with a plac
}

.c2 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c6 {
Expand Down Expand Up @@ -399,12 +399,12 @@ exports[`Media Player: Canonical Entry renders a placeholder image with guidance
}

.c2 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c7 {
Expand Down Expand Up @@ -593,12 +593,12 @@ exports[`Media Player: Canonical Entry renders a portrait container with a place
}

.c2 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: pointer;
}

.c6 {
Expand Down Expand Up @@ -840,12 +840,12 @@ exports[`Media Player: Canonical Entry renders with no-js styles when noJsClassN
}

.c2 {
cursor: pointer;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
cursor: default;
}

.c1:hover .c13,
Expand Down