Fossil SCM

/chat: slight size tweak to try to avoid message truncation in zoom mode. When switching views, ensure that any zoomed widget is moved back where it needs to be so that, e.g. visiting the config view while zooming does not cause the message to locally disappear.

stephan 2025-11-28 18:11 trunk
Commit 5d71561e2052e7a5023801b348f323c42793cd2ac45b0d17f7cac25275dd9c87
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -593,10 +593,14 @@
593593
all other elements in that list. Returns e.
594594
*/
595595
setCurrentView: function(e){
596596
if(e===this.e.currentView){
597597
return e;
598
+ }
599
+ if( e!==this.e.viewZoom && this.e.zoomedMsg ){
600
+ this.zoomMessage(null, e);
601
+ return this.e.currentView;
598602
}
599603
this.e.views.forEach(function(E){
600604
if(e!==E) D.addClass(E,'hidden');
601605
});
602606
this.e.currentView = e;
@@ -607,18 +611,18 @@
607611
},
608612
609613
/**
610614
Makes message element eMsg the content of this.e.viewZoom.
611615
*/
612
- zoomMessage: function(eMsg){
616
+ zoomMessage: function(eMsg,nextView){
613617
const marker = this.e.zoomMarker;
614618
if( !eMsg || eMsg===this.e.zoomedMsg ){
615619
if( this.e.zoomedMsg ){
616620
marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
617621
delete this.e.zoomedMsg;
618622
}
619
- this.setCurrentView(this.e.viewMessages);
623
+ this.setCurrentView(nextView || this.e.viewMessages);
620624
return;
621625
}
622626
console.log("zoom message",eMsg);
623627
if( this.e.zoomedMsg ){
624628
marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
625629
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -593,10 +593,14 @@
593 all other elements in that list. Returns e.
594 */
595 setCurrentView: function(e){
596 if(e===this.e.currentView){
597 return e;
 
 
 
 
598 }
599 this.e.views.forEach(function(E){
600 if(e!==E) D.addClass(E,'hidden');
601 });
602 this.e.currentView = e;
@@ -607,18 +611,18 @@
607 },
608
609 /**
610 Makes message element eMsg the content of this.e.viewZoom.
611 */
612 zoomMessage: function(eMsg){
613 const marker = this.e.zoomMarker;
614 if( !eMsg || eMsg===this.e.zoomedMsg ){
615 if( this.e.zoomedMsg ){
616 marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
617 delete this.e.zoomedMsg;
618 }
619 this.setCurrentView(this.e.viewMessages);
620 return;
621 }
622 console.log("zoom message",eMsg);
623 if( this.e.zoomedMsg ){
624 marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
625
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -593,10 +593,14 @@
593 all other elements in that list. Returns e.
594 */
595 setCurrentView: function(e){
596 if(e===this.e.currentView){
597 return e;
598 }
599 if( e!==this.e.viewZoom && this.e.zoomedMsg ){
600 this.zoomMessage(null, e);
601 return this.e.currentView;
602 }
603 this.e.views.forEach(function(E){
604 if(e!==E) D.addClass(E,'hidden');
605 });
606 this.e.currentView = e;
@@ -607,18 +611,18 @@
611 },
612
613 /**
614 Makes message element eMsg the content of this.e.viewZoom.
615 */
616 zoomMessage: function(eMsg,nextView){
617 const marker = this.e.zoomMarker;
618 if( !eMsg || eMsg===this.e.zoomedMsg ){
619 if( this.e.zoomedMsg ){
620 marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
621 delete this.e.zoomedMsg;
622 }
623 this.setCurrentView(nextView || this.e.viewMessages);
624 return;
625 }
626 console.log("zoom message",eMsg);
627 if( this.e.zoomedMsg ){
628 marker.parentNode.insertBefore(this.e.zoomedMsg, marker);
629
--- src/style.chat.css
+++ src/style.chat.css
@@ -484,11 +484,11 @@
484484
}
485485
body.chat #chat-zoom-content > .message-widget {
486486
flex-grow: 1;
487487
}
488488
body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489
- width: 100%;
489
+ width: 99%;
490490
}
491491
body.chat #chat-zoom-content > .message-widget .toolbar.hide-in-zoom {
492492
/* The various Delete buttons misinteract with zoom mode's moving-around
493493
of message widgets, so hide them in zoom mode. */
494494
position: absolute !important;
495495
--- src/style.chat.css
+++ src/style.chat.css
@@ -484,11 +484,11 @@
484 }
485 body.chat #chat-zoom-content > .message-widget {
486 flex-grow: 1;
487 }
488 body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489 width: 100%;
490 }
491 body.chat #chat-zoom-content > .message-widget .toolbar.hide-in-zoom {
492 /* The various Delete buttons misinteract with zoom mode's moving-around
493 of message widgets, so hide them in zoom mode. */
494 position: absolute !important;
495
--- src/style.chat.css
+++ src/style.chat.css
@@ -484,11 +484,11 @@
484 }
485 body.chat #chat-zoom-content > .message-widget {
486 flex-grow: 1;
487 }
488 body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489 width: 99%;
490 }
491 body.chat #chat-zoom-content > .message-widget .toolbar.hide-in-zoom {
492 /* The various Delete buttons misinteract with zoom mode's moving-around
493 of message widgets, so hide them in zoom mode. */
494 position: absolute !important;
495

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button