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-6955: Filters in global search are misaligned for long content type name #969

Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions src/bundle/Resources/public/scss/_filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
color: $ibexa-color-dark;
margin-top: calculateRem(16px);
margin-bottom: calculateRem(4px);
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@
&__collapsible-list-item {
padding: calculateRem(6px) 0;

.form-check {
width: 100%;
}

.form-check-label {
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
}

.ibexa-input--checkbox {
margin-right: calculateRem(8px);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@

{%- block search_type_choice_widget_options -%}
<li class="ibexa-content-type-selector__item">
{{ form_widget(form[choice.value], {'attr': {'data-name': choice.label}, 'label_attr': {'class': 'checkbox-inline'}}) }}
{{ form_widget(form[choice.value], {'attr': {'data-name': choice.label}, 'label_attr': {'class': 'checkbox-inline', 'title': choice.label }}) }}
</li>
{%- endblock -%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ import React, { useState } from 'react';

import { createCssClassNames } from '../../../common/helpers/css.class.names';

const { ibexa } = window;

const Collapsible = ({ isInitiallyExpanded, title, children }) => {
const [isExpanded, setIsExpanded] = useState(isInitiallyExpanded);
const className = createCssClassNames({
'c-filters__collapsible': true,
'c-filters__collapsible--hidden': !isExpanded,
});
const toggleCollapsed = () => setIsExpanded((prevState) => !prevState);
const initTooltipsRef = (node) => {
ibexa.helpers.tooltips.parse(node);
};

return (
<div className={className}>
<div className={className} ref={initTooltipsRef}>
<div className="c-filters__collapsible-title" onClick={toggleCollapsed}>
{title}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ const ContentTypeSelector = () => {
<label
className="checkbox-inline form-check-label"
htmlFor={`ibexa-search-content-type-${contentType.identifier}`}
title={contentType.name}
data-tooltip-container-selector=".c-udw-tab"
>
{contentType.name}
</label>
Expand Down
Loading