Skip to content

Commit 5306eea

Browse files
committed
TASK: Remove auto publishing feature
1 parent f332d9f commit 5306eea

File tree

8 files changed

+4
-184
lines changed

8 files changed

+4
-184
lines changed

Configuration/Settings.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ Neos:
176176
preferences:
177177
interfaceLanguage: '${q(user).property(''preferences.interfaceLanguage'') || Configuration.setting(''Neos.Neos.userInterface.defaultLanguage'')}'
178178
settings:
179-
isAutoPublishingEnabled: false
180179
targetWorkspace: 'live'
181180
changes:
182181
types:

packages/neos-ui-redux-store/src/User/Settings/index.spec.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/neos-ui-redux-store/src/User/Settings/index.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

packages/neos-ui-redux-store/src/User/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import {combineReducers} from '../combineReducers';
22

3-
import * as Settings from './Settings';
43
import * as Preferences from './Preferences';
54
import * as Name from './Name';
65
import * as Impersonate from './Impersonate';
76

8-
const all = {Settings, Preferences, Name, Impersonate};
7+
const all = {Preferences, Name, Impersonate};
98

109
//
1110
// Export the subreducer state shape interface
1211
//
1312
export interface State {
14-
settings: Settings.State;
1513
preferences: Preferences.State;
1614
name: Name.State;
1715
impersonate: Impersonate.State;
@@ -35,7 +33,6 @@ export const actions = typedKeys(all).reduce((acc, cur) => ({...acc, [cur]: all[
3533
// Export the reducer
3634
//
3735
export const reducer = combineReducers({
38-
settings: Settings.reducer,
3936
preferences: Preferences.reducer,
4037
name: Name.reducer,
4138
impersonate: Impersonate.reducer

packages/neos-ui-sagas/src/Changes/index.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import {takeEvery, put, call, select} from 'redux-saga/effects';
22
import {$get} from 'plow-js';
33

4-
import {actionTypes, actions, selectors} from '@neos-project/neos-ui-redux-store';
4+
import {actionTypes, actions} from '@neos-project/neos-ui-redux-store';
55
import backend from '@neos-project/neos-ui-backend-connector';
66

7-
const {publishableNodesInDocumentSelector, baseWorkspaceSelector} = selectors.CR.Workspaces;
8-
97
function * persistChanges(changes) {
108
const {change} = backend.get().endpoints;
119

@@ -14,15 +12,6 @@ function * persistChanges(changes) {
1412
try {
1513
const feedback = yield call(change, changes);
1614
yield put(actions.ServerFeedback.handleServerFeedback(feedback));
17-
18-
const state = yield select();
19-
const isAutoPublishingEnabled = $get('user.settings.isAutoPublishingEnabled', state);
20-
21-
if (isAutoPublishingEnabled) {
22-
const baseWorkspace = baseWorkspaceSelector(state);
23-
const publishableNodesInDocument = publishableNodesInDocumentSelector(state);
24-
yield put(actions.CR.Workspaces.publish(publishableNodesInDocument.map($get('contextPath')), baseWorkspace));
25-
}
2615
} catch (error) {
2716
console.error('Failed to persist changes', error);
2817
} finally {

packages/neos-ui-sagas/src/Publish/index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import {actionTypes, actions, selectors} from '@neos-project/neos-ui-redux-store
55
import backend from '@neos-project/neos-ui-backend-connector';
66
import {getGuestFrameDocument} from '@neos-project/neos-ui-guest-frame/src/dom';
77

8-
const {publishableNodesInDocumentSelector} = selectors.CR.Workspaces;
9-
108
export function * watchPublish() {
119
const {publish} = backend.get().endpoints;
1210

@@ -27,18 +25,6 @@ export function * watchPublish() {
2725
});
2826
}
2927

30-
export function * watchToggleAutoPublish() {
31-
yield takeEvery(actionTypes.User.Settings.TOGGLE_AUTO_PUBLISHING, function * publishInitially() {
32-
const state = yield select();
33-
const isAutoPublishingEnabled = $get('user.settings.isAutoPublishingEnabled', state);
34-
35-
if (isAutoPublishingEnabled) {
36-
const publishableNodesInDocument = publishableNodesInDocumentSelector(state);
37-
yield put(actions.CR.Workspaces.publish(publishableNodesInDocument.map($get('contextPath')), 'live'));
38-
}
39-
});
40-
}
41-
4228
export function * watchChangeBaseWorkspace() {
4329
const {changeBaseWorkspace} = backend.get().endpoints;
4430
yield takeEvery(actionTypes.CR.Workspaces.CHANGE_BASE_WORKSPACE, function * change(action) {

packages/neos-ui-sagas/src/manifest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ manifest('main.sagas', {}, globalRegistry => {
5151
sagasRegistry.set('neos-ui/Publish/watchChangeBaseWorkspace', {saga: publish.watchChangeBaseWorkspace});
5252
sagasRegistry.set('neos-ui/Publish/discardIfConfirmed', {saga: publish.discardIfConfirmed});
5353
sagasRegistry.set('neos-ui/Publish/watchPublish', {saga: publish.watchPublish});
54-
sagasRegistry.set('neos-ui/Publish/watchToggleAutoPublish', {saga: publish.watchToggleAutoPublish});
5554

5655
sagasRegistry.set('neos-ui/ServerFeedback/watchServerFeedback', {saga: serverFeedback.watchServerFeedback});
5756

packages/neos-ui/src/Containers/PrimaryToolbar/PublishDropDown/index.js

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {$transform, $get} from 'plow-js';
77

88
import Badge from '@neos-project/react-ui-components/src/Badge/';
99
import Icon from '@neos-project/react-ui-components/src/Icon/';
10-
import CheckBox from '@neos-project/react-ui-components/src/CheckBox/';
11-
import Label from '@neos-project/react-ui-components/src/Label/';
1210
import DropDown from '@neos-project/react-ui-components/src/DropDown/';
1311

1412
import I18n from '@neos-project/neos-ui-i18n';
@@ -29,10 +27,8 @@ import style from './style.module.css';
2927
publishableNodesInDocument: publishableNodesInDocumentSelector,
3028
personalWorkspaceName: personalWorkspaceNameSelector,
3129
baseWorkspace: baseWorkspaceSelector,
32-
isWorkspaceReadOnly: isWorkspaceReadOnlySelector,
33-
isAutoPublishingEnabled: $get('user.settings.isAutoPublishingEnabled')
30+
isWorkspaceReadOnly: isWorkspaceReadOnlySelector
3431
}), {
35-
toggleAutoPublishing: actions.User.Settings.toggleAutoPublishing,
3632
changeBaseWorkspaceAction: actions.CR.Workspaces.changeBaseWorkspace,
3733
publishAction: actions.CR.Workspaces.publish,
3834
discardAction: actions.CR.Workspaces.commenceDiscard
@@ -52,8 +48,6 @@ export default class PublishDropDown extends PureComponent {
5248
personalWorkspaceName: PropTypes.string.isRequired,
5349
baseWorkspace: PropTypes.string.isRequired,
5450
neos: PropTypes.object.isRequired,
55-
isAutoPublishingEnabled: PropTypes.bool,
56-
toggleAutoPublishing: PropTypes.func.isRequired,
5751
publishAction: PropTypes.func.isRequired,
5852
discardAction: PropTypes.func.isRequired,
5953
changeBaseWorkspaceAction: PropTypes.func.isRequired,
@@ -92,9 +86,7 @@ export default class PublishDropDown extends PureComponent {
9286
isSaving,
9387
isPublishing,
9488
isDiscarding,
95-
isAutoPublishingEnabled,
9689
isWorkspaceReadOnly,
97-
toggleAutoPublishing,
9890
baseWorkspace,
9991
changeBaseWorkspaceAction,
10092
i18nRegistry,
@@ -107,10 +99,6 @@ export default class PublishDropDown extends PureComponent {
10799
const canPublishLocally = !isSaving && !isPublishing && !isDiscarding && publishableNodesInDocument && (publishableNodesInDocument.length > 0);
108100
const canPublishGlobally = !isSaving && !isPublishing && !isDiscarding && publishableNodes && (publishableNodes.length > 0);
109101
const changingWorkspaceAllowed = !canPublishGlobally;
110-
const autoPublishWrapperClassNames = mergeClassNames({
111-
[style.dropDown__item]: true,
112-
[style['dropDown__item--noHover']]: true
113-
});
114102
const mainButton = this.getTranslatedMainButton(baseWorkspaceTitle);
115103
const dropDownBtnClassName = mergeClassNames({
116104
[style.dropDown__btn]: true,
@@ -213,27 +201,6 @@ export default class PublishDropDown extends PureComponent {
213201
<I18n id="Neos.Neos:Main:reviewChanges" fallback="Review changes"/>
214202
</a>
215203
</li>)}
216-
<li className={autoPublishWrapperClassNames}>
217-
{
218-
/**
219-
PLEASE NOTE: this additional styleClass is a fix, because react checkboxes inside a react select component are buggy,
220-
for further information see https://github.com/neos/neos-ui/pull/3211
221-
*/
222-
}
223-
<Label htmlFor="neos-PublishDropDown-AutoPublish" className={style.dropdownOptionCheckbox}>
224-
<
225-
// @ts-ignore
226-
CheckBox
227-
id="neos-PublishDropDown-AutoPublish"
228-
onChange={toggleAutoPublishing}
229-
isChecked={isAutoPublishingEnabled}
230-
className={style.dropdownOptionCheckbox__input}
231-
/>
232-
<span className={style.dropdownOptionCheckbox__label}>
233-
<I18n id="Neos.Neos:Main:autoPublish" fallback="Auto-Publish"/>
234-
</span>
235-
</Label>
236-
</li>
237204
<li className={style.dropDown__item}>
238205
<a id="neos-PublishDropDown-Workspaces" href={workspaceModuleUri}>
239206
<div className={style.dropDown__iconWrapper}>
@@ -253,8 +220,7 @@ export default class PublishDropDown extends PureComponent {
253220
publishableNodesInDocument,
254221
isSaving,
255222
isPublishing,
256-
isDiscarding,
257-
isAutoPublishingEnabled
223+
isDiscarding
258224
} = this.props;
259225
const canPublishLocally = publishableNodesInDocument && (publishableNodesInDocument.length > 0);
260226

@@ -270,13 +236,6 @@ export default class PublishDropDown extends PureComponent {
270236
return 'Discarding...';
271237
}
272238

273-
if (isAutoPublishingEnabled) {
274-
if (baseWorkspaceTitle) {
275-
return <I18n id="Neos.Neos:Main:autoPublishTo" fallback={'Auto publish to ' + baseWorkspaceTitle} params={{0: baseWorkspaceTitle}}/>;
276-
}
277-
return <I18n id="Neos.Neos:Main:autoPublish" fallback="Auto publish"/>;
278-
}
279-
280239
if (canPublishLocally) {
281240
return <I18n id="Neos.Neos:Main:publishTo" fallback="Publish to" params={{0: baseWorkspaceTitle}}/>;
282241
}

0 commit comments

Comments
 (0)