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

feat(media-container): add expandable - FRONT-4017 #2943

Merged
merged 12 commits into from
Jul 11, 2023

Conversation

emeryro
Copy link
Contributor

@emeryro emeryro commented Jul 6, 2023

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

@github-actions
Copy link

github-actions bot commented Jul 6, 2023

@github-actions github-actions bot temporarily deployed to pull request July 6, 2023 09:10 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 6, 2023 09:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 6, 2023 10:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 6, 2023 11:42 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 6, 2023 12:21 Inactive
@planctus
Copy link
Contributor

planctus commented Jul 7, 2023

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 %}
Copy link
Contributor

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?

Copy link
Contributor

@planctus planctus left a 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.. ;;)

@emeryro
Copy link
Contributor Author

emeryro commented Jul 11, 2023

thanks for the feedback @planctus
Could you have a final look, as the markup and css have been updated?

@github-actions github-actions bot temporarily deployed to pull request July 11, 2023 06:56 Inactive
@github-actions github-actions bot temporarily deployed to pull request July 11, 2023 07:45 Inactive

{% if _expandable is not empty %}
{% include '@ecl/expandable/expandable.html.twig' with _expandable|merge({
extra_classes: _expandable_class,
Copy link
Contributor

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' ||
Copy link
Contributor

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 ;)

Copy link
Contributor

@planctus planctus left a 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

@planctus planctus merged commit 85750fc into v3.9.0-dev Jul 11, 2023
7 checks passed
@planctus planctus deleted the FRONT-4017-media-container-expandable branch July 11, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants