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

Emotion 'styled-components' mentions cleanup #3927

Merged
merged 26 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7cea0fd
Remove linting comment psammead-brand
RichardPK Oct 19, 2020
e1cf945
Update psammead-brand
RichardPK Oct 19, 2020
2ea3a21
Remove linting comment psammead-media-player placeholder
RichardPK Oct 19, 2020
8c94da0
Tidy up references to styled components in psammead-media-player
RichardPK Oct 19, 2020
be1c9c6
Remove comment from dropdown nav
RichardPK Oct 19, 2020
a3818d7
Update dropdown version
RichardPK Oct 19, 2020
436266f
Remove linting comment psammead-script-link
RichardPK Oct 19, 2020
825bbc4
Version bump psammead-script-link
RichardPK Oct 19, 2020
60fee34
Remove styled components keyword psammead-useful-links
RichardPK Oct 19, 2020
8a20f8a
Remove styled components in package description psammead-test-helpers
RichardPK Oct 19, 2020
7fcb200
Merge branch 'latest' into emotion-mentions-cleanup
RichardPK Oct 19, 2020
9a44c0c
Update packages/components/psammead-brand/CHANGELOG.md
RichardPK Oct 19, 2020
572909d
Update packages/components/psammead-media-player/CHANGELOG.md
RichardPK Oct 19, 2020
5aa6341
Update packages/components/psammead-navigation/CHANGELOG.md
RichardPK Oct 19, 2020
c23ee79
Update packages/components/psammead-script-link/CHANGELOG.md
RichardPK Oct 19, 2020
88809ba
Update packages/components/psammead-useful-links/CHANGELOG.md
RichardPK Oct 19, 2020
cd19d12
Update packages/utilities/psammead-test-helpers/CHANGELOG.md
RichardPK Oct 19, 2020
d3409db
Version bumps following talos merge
RichardPK Oct 19, 2020
bbce294
Update packages/components/psammead-brand/CHANGELOG.md
RichardPK Oct 19, 2020
35cafa4
Update packages/components/psammead-media-player/CHANGELOG.md
RichardPK Oct 19, 2020
63882ed
Update packages/components/psammead-script-link/CHANGELOG.md
RichardPK Oct 19, 2020
6732e7e
Revert removal of style lint
RichardPK Oct 19, 2020
0830dd9
Fix merge conflicts by bumping versions
RichardPK Oct 19, 2020
ec25aac
Remove line space in psammead/changelog.md
RichardPK Oct 19, 2020
812634f
Psammead changelog fixes
RichardPK Oct 19, 2020
1438cb7
Merge branch 'latest' into emotion-mentions-cleanup
RichardPK Oct 19, 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
1 change: 1 addition & 0 deletions packages/components/psammead-brand/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------- | ----------- |
| 7.0.3 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove unnecessary comment and linting |
RichardPK marked this conversation as resolved.
Show resolved Hide resolved
| 7.0.2 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-visually-hidden-text, @bbc/psammead-styles |
| 7.0.1 | [PR#3894](https://github.com/bbc/psammead/pull/3894) Talos - Bump Dependencies - @bbc/psammead-script-link |
| 7.0.0 | [PR#3891](https://github.com/bbc/psammead/pull/3891) Migrate to Emotion. |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-brand/package-lock.json

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-brand/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-brand",
"version": "7.0.2",
"version": "7.0.3",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
3 changes: 0 additions & 3 deletions packages/components/psammead-brand/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,12 @@ const BrandSvg = styled.svg`
fill: windowText;
}

/* stylelint-disable */
/* https://www.styled-components.com/docs/advanced#referring-to-other-components */
${StyledLink}:hover &,
${StyledLink}:focus & {
text-decoration: none;
border-bottom: ${GEL_SPACING_HLF} solid ${props => props.logoColour};
margin-bottom: -${GEL_SPACING_HLF};
}
/* stylelint-enable */
`;

const LocalisedBrandName = ({ product, serviceLocalisedName }) =>
Expand Down
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 |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| 5.0.2 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove styled components reference in comments |
RichardPK marked this conversation as resolved.
Show resolved Hide resolved
| 5.0.1 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-assets |
| 5.0.0 | [PR#3902](https://github.com/bbc/psammead/pull/3902) Migrate to emotion |
| 4.0.4 | [PR#3903](https://github.com/bbc/psammead/pull/3903) 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": "5.0.1",
"version": "5.0.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 @@ -15,8 +15,6 @@ const StyledPlaceholder = styled.div`
${({ noJsClassName }) => `cursor: ${noJsClassName ? 'default' : 'pointer'};`}
`;

/* stylelint-disable */
/* https://www.styled-components.com/docs/advanced#referring-to-other-components */
const StyledPlayButton = styled(PlayButton)`
position: absolute;
bottom: 0;
Expand All @@ -31,7 +29,6 @@ const StyledPlayButton = styled(PlayButton)`
background-color: ${C_POSTBOX};
}
`;
/* stylelint-enable */

const Placeholder = ({
onClick,
Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-navigation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 8.0.2 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove comment referencing styled-components. |
| 8.0.1 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-styles, @bbc/psammead-visually-hidden-text |
| 8.0.0 | [PR#3900](https://github.com/bbc/psammead/pull/3900) Migrate to Emotion. |
| 7.0.3 | [PR#3883](https://github.com/bbc/psammead/pull/3883) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-styles, @bbc/psammead-visually-hidden-text |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-navigation/package-lock.json

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-navigation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-navigation",
"version": "8.0.1",
"version": "8.0.2",
"description": "A navigation bar to use on index pages",
"main": "dist/index.js",
"module": "esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ const getButtonDimensions = lineHeight =>
`height: ${calculateButtonSide(lineHeight)}rem;
width: ${calculateButtonSide(lineHeight)}rem;`;

// React allows us to put non-standard HTML attributes onto elements
// whereas styled-components filters them out.
// The `on` amp attribute is classed as non-standard, therefore we
// make a react element which spreads the props as attributes
// and style the React button.
// For some reason the styled-components filtering only happens on SSR
// so is not visible in tests or storybook, only once everything is
// integrated into simorgh.
// eslint-disable-next-line react/prop-types
const Button = ({ script, ...props }) => <button type="button" {...props} />;

Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-script-link/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 3.0.2 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove comment referencing styled-components |
RichardPK marked this conversation as resolved.
Show resolved Hide resolved
| 3.0.1 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-styles |
| 3.0.0 | [PR#3890](https://github.com/bbc/psammead/pull/3890) Migrate to emotion |
| 2.0.3 | [PR#3883](https://github.com/bbc/psammead/pull/3883) Talos - Bump Dependencies - @bbc/psammead-styles |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-script-link/package-lock.json

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-script-link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-script-link",
"version": "3.0.1",
"version": "3.0.2",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
3 changes: 0 additions & 3 deletions packages/components/psammead-script-link/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ const StyledSpan = styled.span`
height: calc(100%);
padding: 0 ${GEL_SPACING};

/* stylelint-disable */
/* https://www.styled-components.com/docs/advanced#referring-to-other-components */
${StyledLink}:hover &,
${StyledLink}:focus & {
margin: 0;
border: 0.1875rem solid ${C_WHITE};
}
/* stylelint-enable */

@media (max-width: ${GEL_GROUP_2_SCREEN_WIDTH_MAX}) {
line-height: calc(${GEL_SPACING_QUIN} - ${GEL_SPACING});
Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-useful-links/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 3.0.2 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove styled components reference |
| 3.0.1 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-styles |
| 3.0.0 | [PR#3890](https://github.com/bbc/psammead/pull/3890) Migrate to emotion |
| 2.0.3 | [PR#3883](https://github.com/bbc/psammead/pull/3883) Talos - Bump Dependencies - @bbc/psammead-styles |
Expand Down

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

4 changes: 2 additions & 2 deletions packages/components/psammead-useful-links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-useful-links",
"version": "3.0.1",
"version": "3.0.2",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand All @@ -13,7 +13,7 @@
"bbc",
"links",
"useful-links",
"styled-components",
"emotion",
"link-promo"
],
"author": {
Expand Down
1 change: 1 addition & 0 deletions packages/utilities/psammead-test-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 5.0.1 | [PR#3927](https://github.com/bbc/psammead/pull/3927) Remove reference to styled-components in pacakge description |
| 5.0.0 | [PR#3869](https://github.com/bbc/psammead/pull/3869) shouldMatchSnapshot simplified to work with Emotion |
| 4.0.0 | [PR#3636](https://github.com/bbc/psammead/pull/3636) Decouple from jest-styled-components |
| 3.1.5 | [PR#3388](https://github.com/bbc/psammead/pull/3388) Update react-helmet to 6.0.0 |
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/psammead-test-helpers/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/utilities/psammead-test-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@bbc/psammead-test-helpers",
"version": "5.0.0",
"version": "5.0.1",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
"description": "A collection of helper methods for implementing Jest snapshot tests for styled-components, required by many Psammead components.",
"description": "A collection of helper methods for implementing Jest snapshot tests for emotion, required by many Psammead components.",
"repository": {
"type": "git",
"url": "https://github.com/bbc/psammead/tree/latest/packages/utilities/psammead-test-helpers"
Expand Down