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

BUG: ContentReference doesn't show hidden status of referenced node in backend #5147

Open
1 task done
Sebobo opened this issue Jun 17, 2024 · 1 comment
Open
1 task done
Assignees
Labels

Comments

@Sebobo
Copy link
Member

Sebobo commented Jun 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When the original node is hidden, the reference doesn't show the translucent effect like the original does, therefore making it impossible to see whether the original is hidden.
The frontend completely hides the node.

Expected Behavior

The same translucent effect should be applied to references of hidden nodes

Steps To Reproduce

Create an image and hide it.
Then use it in a reference.

Environment

- Neos: all versions probably

Anything else?

No response

@Sebobo Sebobo added the Bug label Jun 17, 2024
@Sebobo Sebobo self-assigned this Jun 17, 2024
@Sebobo
Copy link
Member Author

Sebobo commented Jun 17, 2024

How I solved it in my customers project for now:


    referenceNodes = Neos.Fusion:Collection {
        collection = ${referenceNodesArray}
        itemRenderer = Neos.Neos:ContentCase {
          # Show hidden state of referenced node in backend via CSS
          @process.applyHiddenProperty = Neos.Fusion:Augmenter {
            class = 'referenced-node-is-hidden'
            style = 'opacity: 0.3;'
            @if.hidden = ${node.hidden}
            @if.inBackend = ${node.context.inBackend}
          }
        }
        itemName = 'node'

      // Disable ContentElementWrapping for references itself
      prototype(Neos.Neos:ContentElementWrapping) {
        @if.render = false
      }
      // Disable InlineEditable for references itself
      prototype(Neos.Neos:Editable) {
        renderer.editable.condition = false
      }
    }

Note: I would have like to use the class from the Neos UI, but it is prefixed by the JS build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant