Skip to content

da-assets cleanup: split the monolith function and fix some bugs #842

@ravuthu

Description

@ravuthu

The asset selector code in da-assets.js was getting pretty complex - one giant openAssets() function doing everything: fetching config, building URLs, managing the dialog, handling ProseMirror, smart crops, the works.

Also, fix a few bugs that were hiding in there:

  • The approval check for DM assets was using && instead of ||, so assets that were approved but not activated (or vice versa) could slip through
  • Delivery tier was using the wrong field (repo:id) — it should be repo:assetId per the AEM Open API response
  • Videos in author+DM mode now use /play as they should
  • PDFs and other non-image files now use /original/as/ instead of being treated like images

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions