Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.3' into bugfix/3184/document-m…
Browse files Browse the repository at this point in the history
…ove-discard
  • Loading branch information
mhsdesign committed Apr 25, 2024
2 parents 302da1d + 49db1d2 commit 588fe34
Show file tree
Hide file tree
Showing 58 changed files with 894 additions and 662 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
- run: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- run: chmod +x ~/.nvm/nvm.sh
- run:
no_output_timeout: 20m
no_output_timeout: 30m
command: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/Jenkins/update-neos-ui-compiled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cd tmp_compiled_pkg
git add Resources/Public/
git commit -m "Compile Neos UI - $GIT_SHA1" || true

if [[ "$GIT_BRANCH" == "origin/5.3" || "$GIT_BRANCH" == "origin/7.0" || "$GIT_BRANCH" == "origin/7.1" || "$GIT_BRANCH" == "origin/7.2" || "$GIT_BRANCH" == "origin/7.3" || "$GIT_BRANCH" == "origin/8.0" || "$GIT_BRANCH" == "origin/8.1" || "$GIT_BRANCH" == "origin/8.2" || "$GIT_BRANCH" == "origin/8.3" ]]; then
if [[ "$GIT_BRANCH" == "origin/7.3" || "$GIT_BRANCH" == "origin/8.0" || "$GIT_BRANCH" == "origin/8.1" || "$GIT_BRANCH" == "origin/8.2" || "$GIT_BRANCH" == "origin/8.3" ]]; then
echo "Git branch $GIT_BRANCH found, pushing to this branch."
git push origin HEAD:${GIT_BRANCH#*/}
fi
Expand Down
12 changes: 10 additions & 2 deletions Classes/Domain/Model/Changes/CopyInto.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,16 @@ public function getMode()
public function apply()
{
if ($this->canApply()) {
$nodeName = $this->generateUniqueNodeName($this->getParentNode());
$node = $this->getSubject()->copyInto($this->getParentNode(), $nodeName);
$parentNode = $this->getParentNode();
$nodeName = $this->generateUniqueNodeName($parentNode);
// If the parent node has children, we copy the node after the last child node to prevent the copied nodes
// from being mixed with the existing ones due the duplication of their relative indices.
if ($parentNode->hasChildNodes()) {
$lastChildNode = array_slice($parentNode->getChildNodes(), -1, 1)[0];
$node = $this->getSubject()->copyAfter($lastChildNode, $nodeName);
} else {
$node = $this->getSubject()->copyInto($parentNode, $nodeName);
}
$this->finish($node);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function build(array $resourceArrayToSort, \Closure $builderForLine)
$hash = substr(md5_file($resourceExpression), 0, 8);
$resourceExpression = $this->resourceManager->getPublicPackageResourceUriByPath($resourceExpression);
}
$finalUri = $hash ? $resourceExpression . '?' . $hash : $resourceExpression;
$finalUri = $hash ? $resourceExpression . (str_contains($resourceExpression, '?') ? '&' : '?') . $hash : $resourceExpression;
$additionalAttributes = array_merge(
// legacy first level 'defer' attribute
isset($element['defer']) ? ['defer' => $element['defer']] : [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@

use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Property\Exception as PropertyException;
use Neos\Flow\Property\PropertyMapper;
use Neos\Flow\Property\TypeConverter\PersistentObjectConverter;
use Neos\Flow\Security\Exception as SecurityException;
use Neos\Neos\Ui\Domain\Service\NodePropertyConversionService;
use Neos\Neos\Ui\NodeCreationHandler\NodeCreationHandlerInterface;
use Neos\Utility\ObjectAccess;
use Neos\Utility\TypeHandling;

Expand All @@ -27,37 +25,22 @@ class CreationDialogPropertiesCreationHandler implements NodeCreationHandlerInte
{
/**
* @Flow\Inject
* @var PropertyMapper
* @var NodePropertyConversionService
*/
protected $propertyMapper;
protected $nodePropertyConversionService;

/**
* @param NodeInterface $node The newly created node
* @param array $data incoming data from the creationDialog
* @return void
* @throws PropertyException | SecurityException
*/
public function handle(NodeInterface $node, array $data): void
{
$propertyMappingConfiguration = $this->propertyMapper->buildPropertyMappingConfiguration();
$propertyMappingConfiguration->forProperty('*')->allowAllProperties();
$propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_OVERRIDE_TARGET_TYPE_ALLOWED, true);

foreach ($node->getNodeType()->getConfiguration('properties') as $propertyName => $propertyConfiguration) {
foreach ($data as $propertyName => $propertyValue) {
$propertyConfiguration = $node->getNodeType()->getConfiguration('properties')[$propertyName] ?? null;
if (!isset($propertyConfiguration['ui']['showInCreationDialog']) || $propertyConfiguration['ui']['showInCreationDialog'] !== true) {
continue;
}
$propertyType = TypeHandling::normalizeType($propertyConfiguration['type'] ?? 'string');
if (!isset($data[$propertyName])) {
if ($propertyValue === null || ($propertyValue === '' && !TypeHandling::isSimpleType($propertyType))) {
continue;
}
$propertyValue = $data[$propertyName];
if ($propertyValue === '' && !TypeHandling::isSimpleType($propertyType)) {
continue;
}
if ($propertyType !== 'references' && $propertyType !== 'reference' && $propertyType !== TypeHandling::getTypeForValue($propertyValue)) {
$propertyValue = $this->propertyMapper->convert($propertyValue, $propertyType, $propertyMappingConfiguration);
}
$propertyValue = $this->nodePropertyConversionService->convert($node->getNodeType(), $propertyName, $propertyValue, $node->getContext());
if (strncmp($propertyName, '_', 1) === 0) {
ObjectAccess::setProperty($node, substr($propertyName, 1), $propertyValue);
} else {
Expand Down
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ That means:

### Currently maintained versions

* NeosCMS version 8.3: branch 8.3
* NeosCMS version 8.3: branch 8.4
* NeosCMS version 9.0: branch 9.0
* latest development happens currently in the 8.4 and 9.0 branch

#### Releases with just security updates

* NeosCMS version 7.3: branch 7.3
* NeosCMS version 8.0: branch 8.0
* NeosCMS version 8.1: branch 8.1
* NeosCMS version 8.2: branch 8.2
* latest development happens currently in the 8.3 branch

#### Releases with just security updates

* NeosCMS version 5.3: branch 5.3
* NeosCMS version 7.0: branch 7.0
* NeosCMS version 7.1: branch 7.1
* NeosCMS version 7.2: branch 7.2

## Browser support

Expand Down Expand Up @@ -123,13 +122,6 @@ on how to write meaningful descriptions for your contributions.
To do the upmerge run the following commands

```
git checkout 7.0 && git fetch && git reset --hard origin/7.0 && git merge --no-ff --no-commit origin/5.3
# review and `git commit`
git checkout 7.1 && git fetch && git reset --hard origin/7.1 && git merge --no-ff --no-commit origin/7.0
# review and `git commit`
git checkout 7.2 && git fetch && git reset --hard origin/7.2 && git merge --no-ff --no-commit origin/7.1
# review and `git commit`
git checkout 7.3 && git fetch && git reset --hard origin/7.3 && git merge --no-ff --no-commit origin/7.2
# review and `git commit`
git checkout 8.0 && git fetch && git reset --hard origin/8.0 && git merge --no-ff --no-commit origin/7.3
# review and `git commit`
Expand Down
6 changes: 6 additions & 0 deletions Resources/Private/Fusion/Backend/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ backend = Neos.Fusion:Template {
module = 'media/browser'
}
}
defaultModule = Neos.Fusion:UriBuilder {
package = 'Neos.Neos'
controller = 'Backend\\Backend'
action = 'index'
absolute = true
}
}
login = Neos.Fusion:UriBuilder {
controller = 'Login'
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,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="copyNodeTypeNameToClipboard" xml:space="preserve">
<source>Copy node type to clipboard</source>
</trans-unit>
</body>
</file>
</xliff>
Loading

0 comments on commit 588fe34

Please sign in to comment.