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

IBX-3092: dropdown in subfield should be small like other fields #479

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@

{% set label_attr = label_attr|merge({'class': (label_attr.class|default('') ~ ' ibexa-label ibexa-data-source__label ibexa-data-source__label')|trim}) %}
{% set label_wrapper_attr = label_wrapper_attr|default({})|merge({'class': (label_wrapper_attr.class|default('') ~ ' ibexa-data-source__label-wrapper ibexa-data-source__label-wrapper')|trim}) %}
{% set attr = attr|merge({'class': (attr.class|default('') ~ ' ibexa-data-source__input ibexa-data-source__input ibexa-input--small')|trim}) %}
{% set attr = attr|merge({
class: (attr.class|default('') ~ ' ibexa-data-source__input ibexa-data-source__input ibexa-input--small')|trim,
is_small: true,
Copy link
Contributor Author

@tischsoic tischsoic Jun 25, 2022

Choose a reason for hiding this comment

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

I don't like passing this in attr because we usually use attr as HTML element params, but this is how it is currently done in the dropdown widget:


Another option would be to deprecate this approach and add a separate is_small variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe you have other ideas?

}) %}
{% set wrapper_attr = wrapper_attr|default({})|merge({class: (wrapper_attr.class|default('') ~ ' ' ~ wrapper_class)|trim}) %}
{% set widget_wrapper_attr = widget_wrapper_attr|default({})|merge({class: (widget_wrapper_attr.class|default('') ~ ' ibexa-data-source__input-wrapper ibexa-data-source__input-wrapper')|trim}) %}

Expand Down