Skip to content

Commit

Permalink
BUGFIX: CreationDialog hideable elements
Browse files Browse the repository at this point in the history
In the UI it will be once neos/neos-ui#3507 is merged possible to use the `hidden` property in the node creation dialog

```yaml
ui:
  creationDialog:
    elements:
      hiddenProperty:
        type: string
        ui:
          hidden: true
```

This change adjusts neos creationDialogPostprocessor so that creationDialog items that are generated from properties via `showInCreationDialog` will have the hidden property copied

```yaml
properties:
  hiddenProperty:
    type: string
    ui:
      showInCreationDialog: true
      inspector:
        hidden: true
```
  • Loading branch information
mhsdesign committed May 28, 2023
1 parent fd5b9bc commit d514c17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ private function convertPropertyConfiguration(string $propertyName, array $prope
if (isset($propertyConfiguration['ui']['inspector']['position'])) {
$convertedConfiguration['position'] = $propertyConfiguration['ui']['inspector']['position'];
}
if (isset($propertyConfiguration['ui']['inspector']['hidden'])) {
$convertedConfiguration['ui']['hidden'] = $propertyConfiguration['ui']['inspector']['hidden'];
}

$editor = $propertyConfiguration['ui']['inspector']['editor'] ?? $dataTypeDefaultConfiguration['editor'] ?? 'Neos.Neos/Inspector/Editors/TextFieldEditor';
$editorOptions = $propertyConfiguration['ui']['inspector']['editorOptions'] ?? [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function processCopiesInspectorConfigurationToCreationDialogElements(): v
'position' => 123,
'editor' => 'Some\Editor',
'editorOptions' => ['some' => 'option'],
'hidden' => 'ClientEval:false'
],
],
'validation' => [
Expand All @@ -59,6 +60,7 @@ public function processCopiesInspectorConfigurationToCreationDialogElements(): v
'type' => 'string',
'ui' => [
'label' => 'somePropertyName',
'hidden' => 'ClientEval:false',
'editor' => 'Some\Editor',
'editorOptions' => ['some' => 'option'],
],
Expand Down

0 comments on commit d514c17

Please sign in to comment.