Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.3' into 8.0
Browse files Browse the repository at this point in the history
# Conflicts:
#	lerna.json
#	packages/babel-preset-neos-ui/package.json
#	packages/build-essentials/package.json
#	packages/debug-reason-for-rendering/package.json
#	packages/jest-preset-neos-ui/package.json
#	packages/neos-ts-interfaces/package.json
#	packages/neos-ui-backend-connector/package.json
#	packages/neos-ui-ckeditor-bindings/package.json
#	packages/neos-ui-ckeditor5-bindings/package.json
#	packages/neos-ui-constants/package.json
#	packages/neos-ui-containers/package.json
#	packages/neos-ui-contentrepository/package.json
#	packages/neos-ui-decorators/package.json
#	packages/neos-ui-editors/package.json
#	packages/neos-ui-extensibility/package.json
#	packages/neos-ui-guest-frame/package.json
#	packages/neos-ui-i18n/package.json
#	packages/neos-ui-inspector/package.json
#	packages/neos-ui-redux-store/package.json
#	packages/neos-ui-sagas/package.json
#	packages/neos-ui-validators/package.json
#	packages/neos-ui-views/package.json
#	packages/neos-ui/package.json
#	packages/positional-array-sorter/package.json
#	packages/react-proptypes/package.json
#	packages/react-ui-components/package.json
#	packages/utils-helpers/package.json
#	packages/utils-helpers/src/getVersion.ts
#	packages/utils-logger/package.json
#	packages/utils-redux/package.json
  • Loading branch information
markusguenther committed Nov 27, 2022
2 parents 4fb7892 + 7850fc3 commit 7d6b7dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
11 changes: 8 additions & 3 deletions packages/neos-ui-guest-frame/src/initializeGuestFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,19 @@ export default ({globalRegistry, store}) => function * initializeGuestFrame() {
// Remove the inline scripts after initialization
Array.prototype.forEach.call(guestFrameWindow.document.querySelectorAll('script[data-neos-nodedata]'), element => element.parentElement.removeChild(element));

yield put(actions.CR.Nodes.setDocumentNode(documentInformation.metaData.documentNode, documentInformation.metaData.siteNode));
const state = store.getState();

// Set the current document node to the one that is rendered in the guest frame which might be different from the one that is currently selected in the page tree
const currentDocumentNodeContextPath = yield select($get('cr.nodes.documentNode'));
if (currentDocumentNodeContextPath !== documentInformation.metaData.documentNode) {
yield put(actions.CR.Nodes.setDocumentNode(documentInformation.metaData.documentNode, documentInformation.metaData.siteNode));
}
yield put(actions.UI.ContentCanvas.setPreviewUrl(documentInformation.metaData.previewUrl));
yield put(actions.CR.ContentDimensions.setActive(documentInformation.metaData.contentDimensions.active));
// The user may have navigated by clicking an inline link - that's why we need to update the contentCanvas URL to be in sync with the shown content.
// We need to set the src to the actual src of the iframe, and not retrive it from documentInformation, as it may differ, e.g. contain additional arguments.
// We need to set the src to the actual src of the iframe, and not retrieve it from documentInformation, as it may differ, e.g. contain additional arguments.
yield put(actions.UI.ContentCanvas.setSrc(guestFrameWindow.document.location.href));

const state = store.getState();
const editPreviewMode = $get(['ui', 'editPreviewMode'], state);
const editPreviewModes = globalRegistry.get('frontendConfiguration').get('editPreviewModes');
const isWorkspaceReadOnly = selectors.CR.Workspaces.isWorkspaceReadOnlySelector(state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function * watchReloadState({configuration}) {
const toggledNodes = yield select($get('ui.pageTree.toggled'));
const siteNodeContextPath = $get('payload.siteNodeContextPath', action) || currentSiteNodeContextPath;
const documentNodeContextPath = yield $get('payload.documentNodeContextPath', action) || select($get('cr.nodes.documentNode'));
yield put(actions.CR.Nodes.setDocumentNode(documentNodeContextPath, currentSiteNodeContextPath));
yield put(actions.UI.PageTree.setAsLoading(currentSiteNodeContextPath));
const nodes = yield q([siteNodeContextPath, documentNodeContextPath]).neosUiDefaultNodes(
configuration.nodeTree.presets.default.baseNodeType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,7 @@ export default class NodeTreeToolBar extends PureComponent {
focusedNodeContextPath={focusedNodeContextPath}
onClick={this.handleCopyNodes}
isActive={isCopied}
disabled={
isWorkspaceReadOnly ||
destructiveOperationsAreDisabled ||
!canBeEdited
}
disabled={isWorkspaceReadOnly}
id={`neos-${treeType}-CopySelectedNode`}
/>
<CutSelectedNode
Expand Down

0 comments on commit 7d6b7dc

Please sign in to comment.