Skip to content

Commit 27f09c9

Browse files
committed
overflowing menu pills now wrap to new row
1 parent 103cfbe commit 27f09c9

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

popup.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ <h4 class="text-lg font-semibold mb-0">Generate a summary</h4>
6868

6969
<div id="summary-section-main" class="flex flex-col w-full bg-white rounded-r-lg shadow md:mt-0 sm:max-w-md xl:p-0 px-6 py-4 mb-2.5 rounded-l-none" style="border-left: 3px solid rgb(239 68 68);">
7070
<div id="preloader-icon" class="preloader" style="display: none;"></div>
71-
<div id="preloader-container" class="text-[0.825rem]">Generating summary for Terms & Conditions. This could take around. Feel free to close the extension whilst you wait.</div>
72-
<div id="summary-menu" class="flex mb-2" style="display: none;"></div>
71+
<div id="preloader-container" class="text-[0.825rem]"></div>
72+
<div id="summary-menu" class="flex mb-2 flex-wrap" style="display: none;"></div>
7373
<hr id="menu-sep" class="my-[0.625rem]" style="display: none;">
7474
<div id="summaries-container" class="-mt-4">
7575
<h4 id="summaries-container-placeholder" class="text-base font-mono font-semibold mb-0 mt-4">Summaries will be displayed here.</h4>

popup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ function updatePreloadersDisplay() {
758758
relevantSummaries.forEach(summary => {
759759
let summaryElement = document.createElement('div');
760760
summaryElement.className = 'mt-2';
761-
summaryElement.textContent = `Generating summary for ${summary.title}. This could take up to 30 seconds. Feel free to close the extension whilst you wait.`;
761+
summaryElement.textContent = `Generating summary for ${summary.title}. This could take up to a minute for longer policies. Feel free to close the extension whilst you wait.`;
762762
preloaderContainer.appendChild(summaryElement);
763763
});
764764

@@ -905,7 +905,7 @@ function initPopup() {
905905
let pillButton = document.createElement('div');
906906
pillButton.textContent = termType;
907907
pillButton.id = termType.toLowerCase().replace(/[^a-z0-9]/g, '-') + '-menu';
908-
pillButton.className = "rounded-full px-3 py-1 text-xs font-semibold text-gray-300 mr-2 mb-1 mt-1 bg-slate-50 cursor-pointer border-solid border";
908+
pillButton.className = "rounded-full px-3 py-1 text-xs font-semibold text-gray-300 mr-2 mb-1 mt-1 bg-slate-50 cursor-pointer border-solid border max-w-fit";
909909
pillButton.style.borderColor = "lightgray";
910910
pillButton.title = "Show only " + termType;
911911
document.getElementById('summary-menu').style.display = "flex";

production.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,10 @@ video {
927927
.max-w-2xl {
928928
max-width: 42rem;
929929
}
930+
.max-w-fit {
931+
max-width: -moz-fit-content;
932+
max-width: fit-content;
933+
}
930934
.max-w-lg {
931935
max-width: 32rem;
932936
}

0 commit comments

Comments
 (0)