Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.4' into 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed May 14, 2024
2 parents d0764e5 + c263cb5 commit 29e32ad
Show file tree
Hide file tree
Showing 42 changed files with 423 additions and 130 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: make install
run: make install-and-verify
- name: Lint
run: make lint

Expand All @@ -32,7 +32,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: make install
run: make install-and-verify
- name: Build
run: make build-production
- name: Test
Expand Down
6 changes: 2 additions & 4 deletions Build/Jenkins/release-neos-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ make test
VERSION=$VERSION make bump-version
VERSION=$VERSION NPM_TOKEN=$NPM_TOKEN make publish-npm

# add changes to git and push
git add .
git commit -m "Updating composer dependency and npm versions for release of $VERSION"
# we do not commit our working dir (the changes to the `version` field, as they will cause conflicts)
# see https://github.com/neos/neos-ui/issues/3778

git push origin HEAD:$BRANCH
git tag -a -m "$VERSION" $VERSION
git push origin $VERSION
1 change: 1 addition & 0 deletions Classes/Controller/BackendServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ public function changeBaseWorkspaceAction(string $targetWorkspaceName, string $d

// If current document node doesn't exist in the base workspace,
// traverse its parents to find the one that exists
// todo ensure that https://github.com/neos/neos-ui/pull/3734 doesnt need to be refixed in Neos 9.0
$redirectNode = $documentNode;
while (true) {
$redirectNodeInBaseWorkspace = $subgraph->findNodeById($redirectNode->nodeAggregateId);
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ check-requirements:
install: ## Install dependencies
yarn install

install-and-verify:
# Validate this project because were using Zero-Installs (slightly safer as we accept external PRs)
yarn install --immutable --immutable-cache --check-cache

setup: check-requirements install build ## Run a clean setup
@echo Please remember to set frontendDevelopmentMode \
to true in your Settings.yaml.
Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Translations/de/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@
<source>Add</source>
<target state="needs-translation">Einfügen</target>
</trans-unit>
<trans-unit id="collapseAll" xml:space="preserve">
<source>Collapse All</source>
<target state="translated">Alle Ordner zuklappen</target>
</trans-unit>
</body>
</file>
</xliff>
3 changes: 3 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
<trans-unit id="errorBoundary.footer" xml:space="preserve">
<source>For more information about the error please refer to the JavaScript console.</source>
</trans-unit>
<trans-unit id="collapseAll" xml:space="preserve">
<source>Collapse All</source>
</trans-unit>
<trans-unit id="copyNodeTypeNameToClipboard" xml:space="preserve">
<source>Copy node type to clipboard</source>
</trans-unit>
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Translations/es/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@
<source>Add</source>
<target state="translated">Añadir</target>
</trans-unit>
<trans-unit id="copyNodeTypeNameToClipboard" xml:space="preserve">
<source>Copy node type to clipboard</source>
<target state="translated">Copiar tipo de nodo al portapapeles</target>
<trans-unit id="syncPersonalWorkSpace" xml:space="preserve">
<source>Synchronize personal workspace</source>
<target state="translated">Sincronizar el espacio de trabajo personal</target>
Expand Down
150 changes: 150 additions & 0 deletions Tests/IntegrationTests/Fixtures/1Dimension/issue-3184.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
import {beforeEach, checkPropTypes} from './../../utils.js';
import {Page, PublishDropDown} from './../../pageModel';
import { Selector } from 'testcafe';

/* global fixture:true */

//
// Original Issue: https://github.com/neos/neos-ui/issues/3184
//
fixture`FIX #3184: Discarded node move changes are reflected correctly in the document tree`
.beforeEach(beforeEach)
.afterEach(() => checkPropTypes());

//
// This is an excerpt of the document tree in our E2E test distribution,
// stripped down to only show the relevant document nodes for this test
// scenario:
//
// 🗋 Home
// ├─ 🗋 Discarding
// └─ 🗋 Tree multiselect
// ├─ 🗋 MultiA
// ├─ 🗋 MultiB
// └─ 🗋 MultiC
//
// In reference to that hierarchy, we're putting some selectors into variables
// for later use in the concrete test cases, so we don't have to repeat the
// long form over and over:
//
const Discarding = Page.getTreeNodeButton('Discarding');
const MultiA = Page.getTreeNodeButton('MultiA');
const MultiB = Page.getTreeNodeButton('MultiB');
const MultiC = Page.getTreeNodeButton('MultiC');
const withCmdClick = {
modifiers: {
ctrl: true
}
};

test(
'Scenario #1: Moving nodes and then discarding that change does not lead to an error',
async t => {
//
// Select 🗋 MultiA and 🗋 MultiB, then drag both documents INTO 🗋 MultiC.
//
await t
.click(MultiA)
.click(MultiB, withCmdClick)
.dragToElement(MultiA, MultiC);

//
// Discard that change.
//
await PublishDropDown.discardAll();

//
// Assert that no error flash message shows up.
//
await t
.expect(Selector('[role="alert"][class*="error"]').exists)
.notOk();
}
);

test(
'Scenario #2: Moved nodes do not just disappear after discarding the move change',
async t => {
//
// Select 🗋 MultiA and 🗋 MultiB, then drag both documents INTO 🗋 Discarding.
//
await t
.click(MultiA)
.click(MultiB, withCmdClick)
.dragToElement(MultiA, Discarding);

//
// Go to 🗋 Tree multiselect, so we can check for stale metadata
// coming from the guest frame.
// We also need to reload to avoid Scenario #1.
//
await Page.goToPage('Tree multiselect');
await t.eval(() => location.reload(true));
await Page.waitForIframeLoading();

//
// Discard the move change and wait for the guest frame to reload plus
// some extra timeout, so there's a chance for stale metadata to
// overwrite the tree state.
//
await PublishDropDown.discardAll();
await Page.waitForIframeLoading();
await t.wait(500);

//
// Assert that 🗋 MultiA and 🗋 MultiB can still be found.
//
await t
.expect(MultiA.exists)
.ok('🗋 MultiA has disappeared');
await t
.expect(MultiB.exists)
.ok('🗋 MultiB has disappeared');
}
)

test(
'Scenario #3: Discarding a move change while being on a moved node does not'
+ ' lead to an error in the guest frame',
async t => {
//
// Select 🗋 MultiA and 🗋 MultiB, then drag both documents INTO 🗋 MultiC.
//
await t
.click(MultiA)
.click(MultiB, withCmdClick)
.dragToElement(MultiA, MultiC);

//
// Go to 🗋 Home and reload the backend, so we avoid Scenario #1's
// underlying issue.
//
await Page.goToPage('Home');
await t.eval(() => location.reload(true));

//
// Go to 🗋 MultiA, so we are on a moved node in the guest frame.
//
await Page.goToPage('MultiA');

//
// Discard the move change.
//
await PublishDropDown.discardAll();

//
// Assert that there's no error showing up in the guest frame and
// that we're instead seeing the next-higher document node.
//
await Page.waitForIframeLoading();
await t.switchToIframe('[name="neos-content-main"]');
await t
.expect(Selector('.neos-error-screen').exists)
.notOk('There\'s an unexpected error screen in the guest frame.');

await t.switchToMainWindow();
await t
.expect(Selector('[role="treeitem"] [role="button"][class*="isFocused"]').textContent)
.eql('MultiC');
}
);
13 changes: 7 additions & 6 deletions Tests/IntegrationTests/TestDistribution/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin",
"allow-plugins": {
"neos/composer-plugin": true,
"cweagans/composer-patches": true
"neos/composer-plugin": true
}
},
"minimum-stability": "dev",
Expand All @@ -25,15 +24,17 @@

"cweagans/composer-patches": "^1.7.3"
},
"extra": {
"patches": {
"neos/neos-development-collection": {
}
}
},
"require-dev": {
"neos/buildessentials": "@dev",
"phpunit/phpunit": "^9.0",
"phpstan/phpstan": "^1.10"
},
"extra": {
"patches": {
}
},
"repositories": {
"distribution": {
"type": "path",
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"bugs": "https://github.com/neos/neos-ui/issues",
"homepage": "https://github.com/neos/neos-ui/blob/master/README.md",
"license": "GNU GPLv3",
"version": "9.0.0-beta8",
"private": true,
"resolutions": {
"moment": "^2.20.1",
Expand Down Expand Up @@ -44,6 +43,5 @@
"jest": {
"preset": "@neos-project/jest-preset-neos-ui"
},
"packageManager": "[email protected]",
"stableVersion": "8.3.7"
"packageManager": "[email protected]"
}
4 changes: 1 addition & 3 deletions packages/debug-reason-for-rendering/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/debug-reason-for-rendering",
"version": "9.0.0-beta8",
"description": "React Performance Optimization Utility - Why does a component re-render?",
"repository": "neos/neos-ui",
"bugs": "https://github.com/neos/neos-ui/issues",
Expand All @@ -9,6 +8,5 @@
"license": "MIT",
"peerDependencies": {
"react": "^16.12.0"
},
"stableVersion": "8.3.7"
}
}
4 changes: 1 addition & 3 deletions packages/jest-preset-neos-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/jest-preset-neos-ui",
"version": "9.0.0-beta8",
"description": "The jest preset for all packages of the neos-ui mono-repo.",
"main": "jest-preset.json",
"private": true,
Expand All @@ -13,6 +12,5 @@
"peerDependencies": {
"enzyme": "^3.8.0"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
4 changes: 1 addition & 3 deletions packages/neos-ts-interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/neos-ts-interfaces",
"version": "9.0.0-beta8",
"description": "Neos domain-related TypeScript interfaces",
"private": true,
"main": "src/index.ts",
Expand All @@ -9,6 +8,5 @@
"@neos-project/neos-ui-build": "workspace:*",
"typescript": "^4.6.4"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
4 changes: 1 addition & 3 deletions packages/neos-ui-backend-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/neos-ui-backend-connector",
"version": "9.0.0-beta8",
"description": "Endoints and fetch cals to the Neos CMS backend",
"private": true,
"main": "./src/index.ts",
Expand All @@ -12,6 +11,5 @@
"@neos-project/neos-ts-interfaces": "workspace:*",
"@neos-project/utils-helpers": "workspace:*"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
4 changes: 1 addition & 3 deletions packages/neos-ui-build/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"name": "@neos-project/neos-ui-build",
"version": "9.0.0-beta8",
"description": "Bob der Baumeister",
"private": true,
"stableVersion": "8.3.7"
"private": true
}
4 changes: 1 addition & 3 deletions packages/neos-ui-ckeditor5-bindings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/neos-ui-ckeditor5-bindings",
"version": "9.0.0-beta8",
"description": "Prepare CKEditor5 for the Neos CMS UI",
"private": true,
"main": "./src/manifest.js",
Expand Down Expand Up @@ -34,6 +33,5 @@
"react": "^16.12.0",
"react-redux": "^7.1.3"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
4 changes: 1 addition & 3 deletions packages/neos-ui-constants/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"name": "@neos-project/neos-ui-constants",
"version": "9.0.0-beta8",
"description": "Container package to store Neos CMS UI constants",
"private": true,
"main": "./src/index.js",
"devDependencies": {
"@neos-project/jest-preset-neos-ui": "workspace:*",
"typescript": "^4.6.4"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
4 changes: 1 addition & 3 deletions packages/neos-ui-containers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@neos-project/neos-ui-containers",
"version": "9.0.0-beta8",
"description": "Smart components for Neos CMS UI.",
"private": true,
"main": "./src/index.js",
Expand All @@ -18,6 +17,5 @@
"prop-types": "^15.5.10",
"react": "^16.12.0"
},
"license": "GNU GPLv3",
"stableVersion": "8.3.7"
"license": "GNU GPLv3"
}
Loading

0 comments on commit 29e32ad

Please sign in to comment.