Skip to content
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

Remove react-share library and SocialSharing component #6162

Merged
merged 3 commits into from
Jul 11, 2024
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
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": "2.3.1",
"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
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

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

Loading