Skip to content

Commit 27299ab

Browse files
committed
IBX-10416: Wrong styling in sub-items edit translation selector
1 parent f6de641 commit 27299ab

File tree

3 files changed

+37
-13
lines changed

3 files changed

+37
-13
lines changed

src/bundle/Resources/public/scss/ui/modules/sub-items-list/_language.selector.scss

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,31 @@
33
&__items {
44
margin-top: calculateRem(5px);
55
max-height: calc(100vh - #{calculateRem(220px)});
6-
overflow: auto;
6+
}
77

8+
&__item {
89
.form-check-label {
9-
font-size: $ibexa-text-font-size;
10-
line-height: calculateRem(50px);
10+
background: $ibexa-color-white;
11+
display: flex;
12+
width: 100%;
13+
padding: calculateRem(13px) calculateRem(10px);
14+
margin-bottom: calculateRem(12px);
15+
border: calculateRem(1px) solid $ibexa-color-light;
16+
border-radius: $ibexa-border-radius;
17+
box-shadow: calculateRem(4px) calculateRem(2px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.05);
18+
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
19+
cursor: pointer;
20+
line-height: calculateRem(24px);
21+
22+
&:hover {
23+
border-color: $ibexa-color-dark;
24+
transform: scale(1.02) translateX(-10px);
25+
box-shadow: calculateRem(4px) calculateRem(10px) calculateRem(17px) 0 rgba($ibexa-color-info, 0.2);
26+
}
27+
}
28+
29+
.form-check-input {
30+
display: none;
1131
}
1232
}
1333
}

src/bundle/ui-dev/src/modules/sub-items/components/sub-items-list/instant.filter.component.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ const InstantFilter = (props) => {
3939

4040
return (
4141
<div className="ibexa-instant-filter" ref={_refInstantFilter}>
42-
<div className="ibexa-instant-filter__input-wrapper">
43-
<input
44-
type="text"
45-
className="ibexa-instant-filter__input form-control"
46-
placeholder={Translator.trans(/*@Desc("Search by content type")*/ 'instant.filter.placeholder', {}, 'ibexa_sub_items')}
47-
value={filterQuery}
48-
onChange={(event) => setFilterQuery(event.target.value)}
49-
/>
50-
</div>
42+
{props.hasSearch && (
43+
<div className="ibexa-instant-filter__input-wrapper">
44+
<input
45+
type="text"
46+
className="ibexa-instant-filter__input form-control"
47+
placeholder={Translator.trans(/*@Desc("Search by content type")*/ 'instant.filter.placeholder', {}, 'ibexa_sub_items')}
48+
value={filterQuery}
49+
onChange={(event) => setFilterQuery(event.target.value)}
50+
/>
51+
</div>
52+
)}
5153
<div className="ibexa-instant-filter__items">
5254
{props.items.map((item) => {
5355
const radioId = `item_${item.value}`;
@@ -76,11 +78,13 @@ const InstantFilter = (props) => {
7678
};
7779

7880
InstantFilter.propTypes = {
81+
hasSearch: PropTypes.bool,
7982
items: PropTypes.array,
8083
handleItemChange: PropTypes.func,
8184
};
8285

8386
InstantFilter.defaultProps = {
87+
hasSearch: true,
8488
items: [],
8589
handleItemChange: () => {},
8690
};

src/bundle/ui-dev/src/modules/sub-items/components/sub-items-list/language.selector.compoment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const LanguageSelector = (props) => {
2929
<div className={className}>
3030
<div className="ibexa-extra-actions__header">{props.label}</div>
3131
<div className="ibexa-extra-actions__content">
32-
<InstantFilter items={props.languageItems} handleItemChange={props.handleItemChange} />
32+
<InstantFilter items={props.languageItems} handleItemChange={props.handleItemChange} hasSearch={false} />
3333
</div>
3434
</div>
3535
);

0 commit comments

Comments
 (0)