Flowpack / media-ui

The development repository for the new Neos media management interface
GNU General Public License v3.0
20 stars 16 forks source link

Previously selected AssetSource overrides constraints and lead to editors not beeing able to select anything #189

Closed mficzel closed 1 year ago

mficzel commented 1 year ago

Description

If a user selected an assetSource previously in another editor. And later opens the media selection of a property that only allows a single and different asset source he cannot select anything since the constraints do not match. He also cannot resolve the issue by selecting the right assetSource since this dialog is only shown if he has more than two options.

Steps to Reproduce

  1. Have multiple AssetSources
  2. Create a node-property "a" that has nonstraints
  3. Create a node-property "b" that has constraints.assetSources of one assetSource with an Image or Asset Editor
  4. Open the media select dialog for property a (no constraints) and select a collection that is not available in b
  5. Open the media select dialog for property b (with constraints) and observer the following -> since the previously selected collection is not allowed all assets are inactive (grey) -> since you only have a single assetSource no assetSource-selection is shown to allow selecting the actually allowed source

Expected behavior

  1. If the currently selected asset source is different from the allowed asset source the AssetSource selection should be shown.
  2. It should be considered wether the first available AssetSource should be used if the previously selected AssetSource is not in the currently allowed constraints. Maybe this is possible without actually switching the selection. (In this case the selectedAssetSource would be handled more as preferredAssetSource)

Actual behavior

Use sees lots of grey assets and can neither select anything nor change to the allowed asset-source.

Affected Versions

Neos: 8.3 UI: 8.3 Media Module: 0.12

Sebobo commented 1 year ago

Thx for the issue. I fixed this in 7d6b4571