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

Image v3 Preset Type section is not visible when using this component with ImageDelegate. #2535

Open
RSGNR15 opened this issue Jun 27, 2023 · 2 comments

Comments

@RSGNR15
Copy link

RSGNR15 commented Jun 27, 2023

Current Behavior

If I create a new custom component and use Image V3 component with 'ImageDelegate', 'Preset Type' section in the dialog is not displayed.
When I drag and drop an image in the asset section of this component, I can see the Preset Type section is visible for the first time.
But when I reopen this component. I can't see 'Preset Type' section anymore. It is hidden in the dialog console

Please note that, Asset tab is not a first tab of this custom component.

Expected behavior/code
If we use an image in this component and selected a smart crop variation, it should always display 'Preset Type' section in the dialog below the image. It should be hidden.

Environment

  • AEM version and patch level 2023.4.11835.20230414T234523Z-230200
  • Core Components version 2.23.0

Additional context / Screenshots
Image v3 component with smart-crop as 'auto'
image

PS: core.wcm.components.image.v3 clientlib has been added to the component.

@vabs95
Copy link

vabs95 commented Jun 28, 2023

@bpauli the issue is caused by the line 137 in image.js within Image V3 Clientlibs
$cqFileUploadEdit = $dialog.find(".cq-FileUpload-edit:visible");

Checking "visible" will work only in Image Dialog but not on another component which use V3 for delegation as Asset Tab is not visible on dialog load on those components.

Fix: $cqFileUploadEdit = $($dialog.find(".cq-FileUpload-edit")[imageFromPageImage.checked ? 0 : 1]);

Check which fileUpload to pick on the basis of "imageFromPageImage" checked value.

@RSGNR15 RSGNR15 changed the title Image v3 smart crop not working Image v3 Preset Type section is not visible when using this component with ImageDelegate. Jun 29, 2023
@vladbailescu
Copy link
Member

Should be fixed by #2537

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

No branches or pull requests

3 participants