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

ASSETS-33747 named smartcrop in image core v3 component #2698

Merged
merged 17 commits into from Apr 30, 2024

Conversation

mohiaror
Copy link
Collaborator

  • ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Instead of fastly smartcrops, expect named smartcrops in delivery URLs.

  • ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Add editor code to render image through delivery URL and support smartcrop.

  • @trivial fix linting errors.

  • Show smartcrop renditions group even if DM is disabled but polaris is enabled.

  • Update code to also show dynamicmedia group when dialog is loaded with remote asset.

  • Make dependency on clientbuilderfactory optional and check for null. This is to avoid rewriting/fixing all Image test cases.

  • ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Bug fixes.

  • Minor bug fixes.

  • Fix test cases.

  • @trivial Fix existing test cases.

  • ASSETS-33747 named smartcrop in image core v3 component

Review comments. Add a separate test case for smartcrop. Add a failing testcase for auto smartcrop.

  • ASSETS-33747 named smartcrop in image core v3 component

Incorporate review feedback.

  • @trivial Hide the smartcrop option if remote asset does not have smartcrops.

  • ASSETS-33747 named smartcrop in image core v3 component

Add test cases for srcset and responsehandler code.

  • @trivial Move the code to show smartcrop dropdown only after fetching the metadata.

  • @trivial Fix eslint error.


Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Minor: New Feature?
Major: Breaking Change?
Tests Added + Pass? Yes
Documentation Provided Yes (code comments and or markdown)
Any Dependency Changes?
License Apache License, Version 2.0

…stly (#2697)

* ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Instead of fastly smartcrops, expect named smartcrops in delivery URLs.

* ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Add editor code to render image through delivery URL and support smartcrop.

* @trivial fix linting errors.

* Show smartcrop renditions group even if DM is disabled but polaris is enabled.

* Update code to also show dynamicmedia group when dialog is loaded with remote asset.

* Make dependency on clientbuilderfactory optional and check for null. This is to avoid rewriting/fixing all Image test cases.

* ASSETS-33747 named smartcrop in image core v3 component powered by fastly

Bug fixes.

* Minor bug fixes.

* Fix test cases.

* @trivial Fix existing test cases.

* ASSETS-33747 named smartcrop in image core v3 component

Review comments. Add a separate test case for smartcrop. Add a failing testcase for auto smartcrop.

* ASSETS-33747 named smartcrop in image core v3 component

Incorporate review feedback.

* @trivial Hide the smartcrop option if remote asset does not have smartcrops.

* ASSETS-33747 named smartcrop in image core v3 component

Add test cases for srcset and responsehandler code.

* @trivial Move the code to show smartcrop dropdown only after fetching the metadata.

* @trivial Fix eslint error.

---------

Co-authored-by: Levente Sántha <levente@adobe.com>
Copy link

codecov bot commented Mar 17, 2024

Codecov Report

Attention: Patch coverage is 86.20690% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 87.19%. Comparing base (ec57de2) to head (d0c06f5).

❗ Current head d0c06f5 differs from pull request most recent head bdfed59. Consider uploading reports for the commit bdfed59 to get more accurate results

Files Patch % Lines
.../core/components/internal/models/v3/ImageImpl.java 87.17% 2 Missing and 3 partials ⚠️
...dels/v3/NextGenDMSrcsetBuilderResponseHandler.java 75.00% 0 Missing and 2 partials ⚠️
...s/internal/servlets/NGDMEnableRenderCondition.java 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2698      +/-   ##
============================================
- Coverage     87.20%   87.19%   -0.02%     
- Complexity     2673     2683      +10     
============================================
  Files           233      235       +2     
  Lines          7114     7170      +56     
  Branches       1081     1097      +16     
============================================
+ Hits           6204     6252      +48     
- Misses          361      363       +2     
- Partials        549      555       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -51,9 +51,6 @@
text="Enable DM features"
uncheckedValue="false"
value="{Boolean}true">
<granite:rendercondition jcr:primaryType="nt:unstructured"
Copy link
Contributor

@LSantha LSantha Mar 19, 2024

Choose a reason for hiding this comment

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

I'm not sure if this is the way to go. This means that DM features would be always available even if no scene7 or NGDM is available. Is that what you want?
Probably you would need and other render condition for NGDM so that this feature is rendered when either DM or NGDM is available.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@LSantha Is there a rendercondition to check for OSGI configuration's value in core components? Or any other way apart from renderconditions?

FWIW, removal of this rendercondition will only make the enable DM features checkbox visible in the design dialog of image component. It will not enable it by default. An author will have to update the template to enable the feature manually.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mohiaror , I don't think there is such render condition but you can create one.

I know this thing is about the design dialog but as you can see it was still provided with a render condition to avoid any confusion for customer not using this feature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@LSantha I have added an OR condition for both DM and NGDM. Please see if it looks Ok to you.

@LSantha LSantha added this to the 2.25.0 milestone Apr 26, 2024
Copy link

sonarcloud bot commented Apr 30, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@LSantha LSantha merged commit eedb92c into main Apr 30, 2024
3 of 15 checks passed
@LSantha LSantha deleted the issues/ASSETS-33747 branch April 30, 2024 15:33
@mohiaror mohiaror changed the title ASSETS-33747 named smartcrop in image core v3 component powered by fastly ASSETS-33747 named smartcrop in image core v3 component May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants