Adding Product Icon Stack, Play button on Image and Change image aspect ratio #894
Replies: 9 comments 4 replies
-
Product Icon and Video Play button solutions look good to me. For the aspect ratio, do we have any existing similar implementations? One possible change: instead of authors setting
I'm also not sure if we should be more explicit about the form factors ... but this seems a bit verbose. Also do we have to also handle the vertical versions of the aspect ratios? |
Beta Was this translation helpful? Give feedback.
-
Agree with what @chrischrischris wrote. |
Beta Was this translation helpful? Give feedback.
-
Thanks @chrischrischris @vhargrave |
Beta Was this translation helpful? Give feedback.
-
Thanks @aishwaryamathuria, I am going to be implementing some of these patterns on the 'media' block so I'll follow the same conventions and will let you know if any questions come up. FYI, I made a Util func decorateIconStack for a POC on the media block using your example. Maybe we can share this feature on both blocks? I've included some logic to wrap the icon in the link if the label is an |
Beta Was this translation helpful? Give feedback.
-
@rgclayton Could you please share your inputs on the aspect ratio authoring suggestion and if there is an alternative authoring approach we should use in place of specifying the "format: <> <>" string? |
Beta Was this translation helpful? Give feedback.
-
Do we have real-world use cases and designs tied to the aspect ratio ask? I'd like to see shipping pages where this is needed. This is borderline Dexter territory with these types of granular controls. I think If we do have to ship aspect ratio (which I'm not a big fan of), human readable names is way better and +1 to @chrischrischris's suggestion of square, standard, wide. |
Beta Was this translation helpful? Give feedback.
-
For the aspect ratio ask. How are authors going to know which aspect ratios to apply? To Chris' point these are very granular asks that most authors/people don't think about applying unless specifically told to apply "X aspect ratio". If these are needed, would it be better to programmatically apply these per breakpoint and not put the burden on the author to sort out? |
Beta Was this translation helpful? Give feedback.
-
I get that. But are we assuming authors are going to know when to add the appropriate aspect ratio? That's my main concern/question. Would it be better to do this change programmatically per breakpoint? |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion. Have opened a PR with the latest inputs. |
Beta Was this translation helpful? Give feedback.
-
We are working on the milo Aside enhancement ticket https://jira.corp.adobe.com/browse/MWPW-129917 and wanted some inputs on the suitable authoring for the 2 new variations :
Git code diff: https://github.com/adobecom/milo/compare/main...aishwaryamathuria:milo:pocAside?expand=1
POC preview with Product stack: https://pocaside--milo--aishwaryamathuria.hlx.page/drafts/mathuria/aside/asideprdlist-poc
POC preview with modal video: https://pocaside--milo--aishwaryamathuria.hlx.page/drafts/mathuria/aside/asidevideo-poc
Product Icon Stack:
Requirement:
Authoring Solution:
The authoring proposed for this variation would require authors to add the product icon and description in form of an unordered list in the text area of aside block. The JS would then add the required size class to ‘ul’ tag (in case of supported aside) and format the grid.
Video Play button on image:
Requirement:
Authoring Solution:
On Milo adding a link with #modal will open the fragment in a modal.
The authoring proposed for this variation would require authors to add fragment link containing video with modal identifier ‘#modal’ in the image area of the aside block. The block will check if the image area contains a link with modalHash and if it does it will add a play icon with same href. On clicking the link the fragment will open in modal in which video will play.
Image aspect ratio:
Requirement:
Desktop: 16:9 or 4:3 Tablet: 16:9 or 4:3 Mobile: 16:9 or 4:3 or 1:1
Authoring Solution:
The authoring proposed for this variation would require authors to add the aspect-ratio below the media in format
Mobile Tablet Desktop
orMobile+Tablet Desktop
orMobile+Tablet+Desktop
to have required height of image in place of the default min-height or auto height. The block will check if the image area contains aspect ratio defined it will set the class in the to adjust height of media container accordingly in specific viewports and remove the ap tag containing the aspect ratio string after processing.
Please provide your inputs on the proposed solution.
Adding code diff for reference https://github.com/adobecom/milo/compare/main...aishwaryamathuria:milo:pocAside?expand=1
CC: @chrischrischris @vhargrave @dstrong23 @rgclayton @ryanmparrish @auniverseaway @salonijain3 @narcis-radu @amitbikram
Beta Was this translation helpful? Give feedback.
All reactions