Skip to content

Commit

Permalink
Merge branch 'main' into extensible-validation
Browse files Browse the repository at this point in the history
* main:
  Remove `react-share` library and `SocialSharing` component (#6162)
  • Loading branch information
sneridagh committed Jul 11, 2024
2 parents 709ed59 + 8915be3 commit 84bc5bf
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 155 deletions.
5 changes: 5 additions & 0 deletions docs/source/upgrade-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ This change is needed for consistency with module suffixes in Volto core, in pre
It is unlikely that your code uses it, unless you heavily customized the Jest testing pipeline.


### Remove `react-share` library and `SocialSharing` component

This was not used by the core since some time ago, and nowadays is more suitable for being an add-on and not being included in core.
If you still use it, bring it back as your main add-on dependency, bring back the `SocialSharing` component from Volto 17 as a custom component in your add-on code.

(volto-upgrade-guide-17.x.x)=

## Upgrading to Volto 17.x.x
Expand Down
1 change: 1 addition & 0 deletions packages/volto/news/6162.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove `react-share` library and `SocialSharing` component @sneridagh
1 change: 0 additions & 1 deletion packages/volto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@
"react-router-hash-link": "2.4.3",
"react-select": "4.3.1",
"react-select-async-paginate": "0.5.3",
"react-share": "5.1.0",
"react-side-effect": "2.1.2",
"react-simple-code-editor": "0.7.1",
"react-sortable-hoc": "2.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/volto/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export { default as Logout } from '@plone/volto/components/theme/Logout/Logout';
export { default as Sitemap } from '@plone/volto/components/theme/Sitemap/Sitemap';
export { default as Search } from '@plone/volto/components/theme/Search/Search';
export { default as Comments } from '@plone/volto/components/theme/Comments/Comments';
export { default as SocialSharing } from '@plone/volto/components/theme/SocialSharing/SocialSharing';
export { default as Register } from '@plone/volto/components/theme/Register/Register';
export { default as PasswordReset } from '@plone/volto/components/theme/PasswordReset/PasswordReset';
export { default as RequestPasswordReset } from '@plone/volto/components/theme/PasswordReset/RequestPasswordReset';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions packages/volto/src/components/theme/View/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,6 @@ class View extends Component {
this.props.content.subjects.length > 0 && (
<Tags tags={this.props.content.subjects} />
)}
{/* Add opt-in social sharing if required, disabled by default */}
{/* In the future this might be parameterized from the app config */}
{/* <SocialSharing
url={typeof window === 'undefined' ? '' : window.location.href}
title={this.props.content.title}
description={this.props.content.description || ''}
/> */}
{this.props.content.allow_discussion && (
<Comments pathname={this.props.pathname} />
)}
Expand Down
3 changes: 0 additions & 3 deletions packages/volto/src/components/theme/View/View.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jest.mock('../../manage/Toolbar/Toolbar', () =>
jest.fn(() => <div id="Portal" />),
);

jest.mock('../SocialSharing/SocialSharing', () =>
jest.fn(() => <div id="SocialSharing" />),
);
jest.mock('../Comments/Comments', () => jest.fn(() => <div id="Comments" />));
jest.mock('../Tags/Tags', () => jest.fn(() => <div id="Tags" />));
jest.mock('../SlotRenderer/SlotRenderer', () =>
Expand Down
21 changes: 0 additions & 21 deletions pnpm-lock.yaml

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

0 comments on commit 84bc5bf

Please sign in to comment.