Skip to content

Commit

Permalink
Avoid using trunk8 for truncation
Browse files Browse the repository at this point in the history
We can use CSS. Trunk8 is no longer maintained and there's a css alternative
  • Loading branch information
jcoyne committed Jan 20, 2024
1 parent 51325e2 commit 58c693e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 393 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/modules/accordion-sections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
.snippet {
color: $sul-mini-accordion-text-color;
@extend .remove-list-styles;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.details {
Expand Down
1 change: 0 additions & 1 deletion app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import "@hotwired/turbo-rails";
import "./vendor/responsiveTruncator";
import "./vendor/trunk8";
import "./vendor/jquery-scrollspy";
import "leaflet";
// import "popper.js";
Expand Down
6 changes: 0 additions & 6 deletions app/javascript/preview-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ const PreviewContent = (function() {
.plugGoogleBookContent();

target.find('*[data-accordion-section-target]').accordionSection();
target.find("[data-behavior='trunk8']").trunk8({
tooltip: false
});
target.find('[data-live-lookup-url]').liveLookup();
deferred.resolve(content);
break;
Expand All @@ -59,9 +56,6 @@ const PreviewContent = (function() {
.plugGoogleBookContent();

target.find('*[data-accordion-section-target]').accordionSection();
target.find("[data-behavior='trunk8']").trunk8({
tooltip: false
});
target.find('[data-live-lookup-url]').liveLookup();
deferred.resolve(content);
break;
Expand Down
3 changes: 0 additions & 3 deletions app/javascript/truncate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ Blacklight.onLoad(function(){
);
$("[data-behavior='truncate-results-metadata-links']").responsiveTruncate({lines: 2, more: 'more...', less: 'less...'});
$("[data-behavior='truncate']").responsiveTruncate({height: 60});
$("[data-behavior='trunk8']").trunk8({
tooltip: false
});
});
Loading

0 comments on commit 58c693e

Please sign in to comment.