Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70592

Prevent corrupted data and images when managing Adaptive Media Images

    Details

      Description

      Motive

      Adaptive Media Images configuration is used to generate image variants according to the values of the configurations. The images and the configuration are linked using a unique id (uuid) for each of the configurations. This uuid is automatically created when a new configuration is added.
      This means that for a specific configuration uuid we can obtain a list of the images that are generated for that configuration.

      Right now we also allow portal administrators to update the configuration values. This can lead to corrupted data, because if we change the max-width or max-height for a specific configuration that already has created some image variants, we will end up having a bunch of images with the previous max-width/max-height while the new images will be generated using the new max-width/max-height. Therefore, allowing portal administrators to modify the settings for a specific configuration is not a good idea.

      The aim of this story is to disallow portal administrators change the max-width and max-height value for configurations that already have images generated. We will give support for the following scenarios:

      • If the configuration doesn't have any image generated, the portal administrator can change the max-width and max-height of the configuration.
      • If the configuration already has images generated, the portal administrator can either disabled the configuration (LPS-70591) and create a new configuration with a different name and the desired max-width and max-height or he can delete the configuration (he will need to disable it first) and then create the new configuration which can have the same name as the original one.

      We understand that this is a limitation that we are imposing portal administrators but we think that since the actions to create/update/delete adaptive media images configuration shouldn't happen very often, it's more important to ensure the consistency and integrity of the data.

      Acceptance Criteria

      • Portal Administrators can modify the max-width and max-height of configurations that don't have any images generated and therefor it cannot lead to data corruption.
      • Portal Administrators cannot modify the max-width and max-height of configurations that have already some images generated. In this case, they will need to either disable or delete the configuration, create a new one with the new max-width and max-height values and regenerate the images.

      Use cases

      Main Scenario: A portal admin wants to modify an Image Resolution that has optimized-images.

      1. Select an Image Resolution with optimized-images
      2. Click Edit action

      Expected: The user can only modify the Name field and an Info Alert is shown explaining what to do.

      A portal admin wants to modify an Image Resolution that doesn't have optimized-images.

      1. Select an Image Resolution without optimized-images
      2. Click Edit action

      Expected: The user can modify all the values.

      User Experience

      Summary

      1. Progress bar warning state is removed.
      2. Edit an Image Resolution has changed.

      Interaction

      Behavior

      • If an Image Resolution has optimized images and the user tries to edit values an Info Alert is shown.

      Info Alert

      • It's show at the top of the page.
      • Content: "This resolution has already optimized-images. Please, if you want different dimension values you must create a new image resolution."

      Editing an Image Resolution

      Enabled Resolution with optimized-images

      • Name field is enabled.
      • The remaining fields are disabled.
      • Info Alert is shown.

      Enabled Resolution without optimized-images

      • All the fields are enabled.

      Disabled Resolution with optimized-images

      • Name field is enabled.
      • The remaining fields are disabled.
      • Info Alert is shown.

      Disabled Resolution without optimized-images

      • All the fields are enabled.

      Interactive prototype

      URL: http://usbypv.axshare.com

      Design

      Image Resolution with optimized-images

      Image Resolution without optimized-images

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                patricia.perez Patricia Perez
                Reporter:
                sergio.gonzalez Sergio Gonzalez (Inactive)
                Recent user:
                Patricia Perez
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.0.0 M6