Skip to content

Commit

Permalink
fix: jstree elements overflow text properly with ellipses. (#2996)
Browse files Browse the repository at this point in the history
- Resolves VUFIND-1621.
  • Loading branch information
crhallberg authored Jul 19, 2023
1 parent e0e8eec commit c9e0356
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 7 deletions.
2 changes: 1 addition & 1 deletion themes/bootprint3/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/bootprint3/theme.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'external-link' => 'Fugue:link.png',
'facet-applied' => 'Fugue:tick.png',
// 'facet-checked' => inherited from parent theme,
'facet-exclude' => 'Fugue:cross.png',
// 'facet-exclude' => inherited from parent theme,
// 'facet-unchecked' => inherited from parent theme,
'feedback' => 'Fugue:email.png',
'format-atlas' => 'Fugue:map.png',
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap3/css/compiled.css

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion themes/bootstrap3/less/components/js-tree.less
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@
padding-left: 1rem;
}

/* facet and tree text overflow */
.facet .text {
overflow: hidden;
}

.hierarchical-facet-anchor,
.hierarchical-facet-anchor .text {
width: calc(100% - 1.5em);
}
[data-exclude] .hierarchical-facet-anchor,
[data-exclude] .hierarchical-facet-anchor .text {
width: calc(100% - 3.0em);
}

.hierarchy-tree .jstree-node,
.hierarchical-facet-anchor .text .icon-link__label {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.hierarchical-facet-anchor .text .icon-link__label {
display: inline;
}

.jstree-clicked,
.jstree-clicked:active,
.jstree-clicked:focus,
Expand All @@ -71,7 +95,7 @@
background-color: @list-group-active-bg;

.jstree-themeicon-custom {
color: #fff;
color: @list-group-active-color;
filter: invert(1);
}
}
Expand Down
26 changes: 25 additions & 1 deletion themes/bootstrap3/scss/components/js-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,30 @@
padding-left: 1rem;
}

/* facet and tree text overflow */
.facet .text {
overflow: hidden;
}

.hierarchical-facet-anchor,
.hierarchical-facet-anchor .text {
width: calc(100% - 1.5em);
}
[data-exclude] .hierarchical-facet-anchor,
[data-exclude] .hierarchical-facet-anchor .text {
width: calc(100% - 3.0em);
}

.hierarchy-tree .jstree-node,
.hierarchical-facet-anchor .text .icon-link__label {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.hierarchical-facet-anchor .text .icon-link__label {
display: inline;
}

.jstree-clicked,
.jstree-clicked:active,
.jstree-clicked:focus,
Expand All @@ -71,7 +95,7 @@
background-color: $list-group-active-bg;

.jstree-themeicon-custom {
color: #fff;
color: $list-group-active-color;
filter: invert(1);
}
}
Expand Down
2 changes: 1 addition & 1 deletion themes/local_theme_example/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/sandal/css/compiled.css

Large diffs are not rendered by default.

0 comments on commit c9e0356

Please sign in to comment.