-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(media-container): add expandable - FRONT-4017 #2943
Conversation
Question: where is "Infography" coming from..? :) Is this an english word..? Shouldn't it be infographic..? |
@@ -81,6 +83,10 @@ | |||
{% set _css_class = _css_class ~ ' ' ~ extra_classes %} | |||
{% endif %} | |||
|
|||
{% if _expandable is not empty and _expandable.id is defined %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not setting this as an item of extra_attributes instead of building the string manually?
src/implementations/twig/components/media-container/media-container.html.twig
Outdated
Show resolved
Hide resolved
src/implementations/twig/components/media-container/media-container.html.twig
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few comments left to your evaluation.. ;;)
thanks for the feedback @planctus |
|
||
{% if _expandable is not empty %} | ||
{% include '@ecl/expandable/expandable.html.twig' with _expandable|merge({ | ||
extra_classes: _expandable_class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing this would override existing extra_classes in the data, i think we should merge this class with the others, if present.
@@ -223,7 +224,10 @@ const prepareData = (data, args) => { | |||
|
|||
const renderStory = (data, args) => { | |||
let story = banner(prepareData(data, args)); | |||
if (args.width === 'container' || args.width === 'inside') { | |||
if ( | |||
args.width === 'inside the grid container' || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it felt there was something strange since you are receiving the labels and not the values in the args object, this is due to a reverse mapping, it should be:
mapping: {
'outside the ecl-container': 'outside',
'inside the ecl-container': 'container',
'inside the ecl-container, with fullwidth class': 'inside',
},
and then you would deal with the values here, the same in the url ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure this thing makes really much sense, not it's better since the button is part of the standard markup of the component, but still it feels like this is a composition sort of...anyway, i've just noticed something odd in the story, tha we can fix
Main component css classes have been put a level higher, in a container, to be able to add an optional expandable block.
also fix some missing dependencies for picture component