- fix charPanel div heights - fix noHotswap area height & flex dir

506e2f2c6f186fb30a0fff6ce80c54b732e8cd2d

RossAscends <124905043+RossAscends@users.noreply.github.com>

6 files changed, +41 -3Showing whitespace changes
public/css/st-tailwind.css+4 -0
@@ -332,6 +332,10 @@
332332 overflow: hidden;
333333}
334334
335+.overflowYScroll {
336+ overflow-y: scroll;
337+}
338+
335339.padding0 {
336340 padding: 0;
337341}
public/css/toggle-dependent.css+7 -0
@@ -19,6 +19,7 @@ body:not(.tts) #ttsExtensionNarrateAll {
1919}
2020
2121body.no-hotswap .hotswap,
22+body.no-hotswap .hotswap~hr,
2223body.no-timer .mes_timer,
2324body.no-timestamps .timestamp,
2425body.no-tokenCount .tokenCounterDisplay,
@@ -28,6 +29,12 @@ body.hideChatAvatars .mesAvatarWrapper .avatar {
2829 display: none !important;
2930}
3031
32+body.no-hotswap #CharListButtonAndHotSwaps .flex-container {
33+ flex-wrap: nowrap;
34+ align-items: flex-end;
35+ flex-flow: row;
36+}
37+
3138body.hideChatAvatars .last_mes:not(.smallSysMes) {
3239 padding-bottom: 20px !important;
3340}
public/index.html+4 -2
@@ -5455,10 +5455,12 @@
54555455 <div class="right_menu_button fa-solid fa-list-ul" id="rm_button_characters" title="Select/Create Characters" data-i18n="[title]Select/Create Characters"></div>
54565456 </div>
54575457 <div id="HotSwapWrapper" class="alignitemscenter flex-container margin0auto wide100p">
54585458 <div class="hotswap avatars_inline scroll-reset-container expander" data-i18n="[no_favs]Favorite characters to add them to HotSwaps" no_favs="Favorite characters to add them to HotSwaps"></div>
54595459 </div>
5460+ <hr class="wide100p">
54605461 </div>
54615462 <hr/div>
5463+
54625464 <!-- this div structure must be preserved until group peeking can adjust -->
54635465 <div id="rm_PinAndTabs">
54645466 <div id="right-nav-panel-tabs" class="">
public/script.js+22 -0
@@ -10339,9 +10339,25 @@ export async function doNavbarIconClick() {
1033910339 icon.toggleClass('openIcon closedIcon');
1034010340 drawer.toggleClass('openDrawer closedDrawer');
1034110341
10342+ //commented code is to prevent scrollbars showing during transition, if we want to do that
10343+ //'scrollableInner' only exists on samplers panel though, so will need different logic for each drawer
10344+ //this does create an undesireable leftward width retraction of about 15px if a natural scrollbar pops after transition
10345+ //however, if we don't prevent the transition scrollbar, we get a 15px expansion right when it is no longer needed
10346+ //we get to pick our poison. (or...we go with just opacity transitions and stop caring about height and layout shifts.)
10347+ //only true fix for this is to make scrollbars always show (overflow-y:scroll), and style them so they are transparent until div hover
10348+ //this creates a 15px perma-padding on the right of the div tho, even when not needed
10349+ //example of this can be seen on STMP's pastChat list
10350+
10351+ //drawer.find('.scrollableInner').addClass('overflowHidden'); //prevents scrollbars
10352+ //await delay(250); //this duration is presumed
10353+ //drawer.find('.scrollableInner').removeClass('overflowHidden'); //restore after transition
10354+
1034210355 if (targetDrawerID === 'right-nav-panel') {
1034310356 favsToHotswap();
1034410357 $('#rm_print_characters_block').trigger('scroll');
10358+ const hotSwapBlockHeight = $('#CharListButtonAndHotSwaps').css('height');
10359+ const heightMinusHotSwapBlockHeight = 'calc(100% - ' + hotSwapBlockHeight + ')';
10360+ $('#rm_ch_create_block, #rm_characters_block').css('height', heightMinusHotSwapBlockHeight);
1034510361 }
1034610362
1034710363 // Set the height of "autoSetHeight" textareas within the drawer to their scroll height
@@ -10353,8 +10369,14 @@ export async function doNavbarIconClick() {
1035310369 }
1035410370 }
1035510371 } else if (drawerWasOpenAlready) {
10372+
10373+ //drawer.find('.scrollableInner').toggleClass('overflowHidden'); //prevents scrollbars
10374+
1035610375 icon.toggleClass('closedIcon openIcon');
1035710376 drawer.toggleClass('closedDrawer openDrawer');
10377+
10378+ //await delay(250); //this duration is presumed
10379+ //drawer.find('.scrollableInner').toggleClass('overflowHidden'); //restore to default
1035810380 }
1035910381}
1036010382
public/scripts/power-user.js+3 -0
@@ -453,6 +453,9 @@ function fixMarkdown(text, forDisplay) {
453453function switchHotswap() {
454454 $('body').toggleClass('no-hotswap', !power_user.hotswap_enabled);
455455 $('#hotswapEnabled').prop('checked', power_user.hotswap_enabled);
456+ const hotSwapBlockHeight = $('#CharListButtonAndHotSwaps').css('height');
457+ const heightMinusHotSwapBlockHeight = 'calc(100% - ' + hotSwapBlockHeight + ')';
458+ $('#rm_ch_create_block, #rm_characters_block').css('height', heightMinusHotSwapBlockHeight);
456459}
457460
458461function switchTimer() {
public/style.css+1 -1
@@ -3369,7 +3369,7 @@ input[type=search]:focus::-webkit-search-cancel-button {
33693369#form_create {
33703370 display: flex;
33713371 flex-direction: column;
33723372 height: calc(100% - var(--topBarBlockSize));
33733373 overflow-y: auto;
33743374 padding: 1px;
33753375}