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: Add missing type converts for asset subtypes #5007

Merged
merged 1 commit into from Apr 27, 2024

Conversation

Sebobo
Copy link
Member

@Sebobo Sebobo commented Apr 23, 2024

This prevents the raw data from being base64 encoded into the rendered output of the Neos backend and included in xhr requests from the Neos UI.

Additionally the default settings for editor and constraints makes the usage of those affected types easier in nodetype properties.

Resolves: #5006

Review instructions

Example nodetype to use in the Neos backend with the raw content mode:

'Neos.Demo:Content.Test':
  superTypes:
    'Neos.Neos:Content': true
    'Neos.Demo:Constraint.Content.Column': true
    'Neos.Demo:Constraint.Content.Main': true
  ui:
    label: Test
    icon: picture
    position: start
    inspector:
      groups:
        settings:
          label: Test Settings
  properties:
    video:
      type: Neos\Media\Domain\Model\Video
      ui:
        label: 'Video'
        reloadIfChanged: true
        showInCreationDialog: true
        inspector:
          group: 'settings'
          editor: Neos.Neos/Inspector/Editors/AssetEditor
    document:
      type: Neos\Media\Domain\Model\Document
      ui:
        label: Document
        inspector:
          group: 'settings'
          editor: Neos.Neos/Inspector/Editors/AssetEditor
    audio:
      type: Neos\Media\Domain\Model\Audio
      ui:
        label: Audio
        inspector:
          group: 'settings'
          editor: Neos.Neos/Inspector/Editors/AssetEditor

Without the change in this PR, setting the 3 properties will each increase the size of the preview html and node change requests.
Also errors are thrown if the editor for each property is not defined.

With this change, the size of the output does not increase and the editor does not need to be defined anymore.

This prevents the raw data from being base64 encoded into the
rendered output of the Neos backend and included in
xhr requests from the Neos UI.

Additionally the default settings for editor and constraints makes the usage of those affected types easier in nodetype properties.

Resolves: #5006
Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

👍 by 👀

@mhsdesign mhsdesign self-requested a review April 23, 2024 13:55
@nezaniel nezaniel self-requested a review April 27, 2024 07:14
@nezaniel
Copy link
Member

Makes a lot of sense, already ran into the configuration hassle myself lately

@nezaniel nezaniel merged commit 702f212 into 8.3 Apr 27, 2024
9 checks passed
@nezaniel nezaniel deleted the bugfix/5006-asset-type-converters branch April 27, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants