Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: CreationDialog hideable elements #3507

Merged
merged 1 commit into from
May 30, 2023

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented May 28, 2023

closes partially (the ui part) #3483

optional neos part for support of showInCreationDialog: neos/neos-development-collection#4297

introduces logic to evaluate

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

clientEval is working out of the box, since the configuration has been evaluated with preprocessNodeConfiguration

Bildschirmaufnahme.2023-05-28.um.09.59.31.mov

What I did

How I did it

How to verify it

test it with this (or your own) nodeType.

Note that creationDialog items that are generated from properties via showInCreationDialog will not yet have the hidden property copied, for this a fix in neos/neos has to be done (neos/neos-development-collection#4297)

'My.Test:NodeType':
  superTypes:
    'Neos.Neos:Content': true
  ui:
    creationDialog:
      elements:
        bool:
          type: boolean
          ui:
            label: "Enable Text Field"
        text:
          type: string
          ui:
            label: "Select this"
            hidden: "ClientEval:!node.properties.bool"
            editor: Neos.Neos/Inspector/Editors/SelectBoxEditor
            editorOptions:
              values:
                13:
                  label: "13"
                42:
                  label: "42"
        otherField:
          type: string
          ui:
            label: "Other Field"
            hidden: "ClientEval:node.properties.text !== '13'"
            editor: Neos.Neos/Inspector/Editors/TextFieldEditor

introduces logic to evaluate

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

clientEval is working out of the box, since the configuration has been evaluated with `preprocessNodeConfiguration`
@github-actions github-actions bot added Bug Label to mark the change as bugfix 7.3 labels May 28, 2023
mhsdesign added a commit to neos/neos-development-collection that referenced this pull request May 28, 2023
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
```
@Sebobo Sebobo self-requested a review May 30, 2023 08:25
Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good by reading

@mhsdesign
Copy link
Member Author

someone should try it with 7.3 (and webpack) i just backportet it from 8.3

@Sebobo
Copy link
Member

Sebobo commented May 30, 2023

Tried in 7.3 and works 👍

@Sebobo Sebobo merged commit f2d18d5 into 7.3 May 30, 2023
@Sebobo Sebobo deleted the bugfix/3483-creationDialogHideElements branch May 30, 2023 08:43
neos-bot pushed a commit to neos/neos that referenced this pull request Sep 8, 2023
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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.3 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants