Skip to content

Commit

Permalink
IBX-6955: Filters in global search are misaligned for long content ty…
Browse files Browse the repository at this point in the history
…pe name
  • Loading branch information
GrabowskiM committed Nov 2, 2023
1 parent 3f84114 commit 74ef62f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
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
@@ -1,4 +1,4 @@
import React, { useContext } from 'react';
import React, { useContext, useEffect } from 'react';

Check failure on line 1 in src/bundle/ui-dev/src/modules/universal-discovery/components/content-type-selector/content.type.selector.js

View workflow job for this annotation

GitHub Actions / Frontend build test

'useEffect' is defined but never used

import { SelectedContentTypesContext } from '../search/search';
import { AllowedContentTypesContext } from '../../universal.discovery.module';
Expand Down 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

0 comments on commit 74ef62f

Please sign in to comment.