webui: add print styles for full chat printing
Implement CSS print media queries across key webui components to ensure
complete chat conversations can be printed without content truncation.
They're not perfect but better than nothing.
Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s3815b4291912c721k
diff --git a/webui/src/web-components/sketch-timeline.ts b/webui/src/web-components/sketch-timeline.ts
index 2f8e5e3..964574e 100644
--- a/webui/src/web-components/sketch-timeline.ts
+++ b/webui/src/web-components/sketch-timeline.ts
@@ -259,8 +259,51 @@
transform: rotate(360deg);
}
}
- `;
+ /* Print styles for full timeline printing */
+ @media print {
+ .timeline-container {
+ height: auto !important;
+ max-height: none !important;
+ overflow: visible !important;
+ page-break-inside: avoid;
+ }
+
+ .timeline {
+ height: auto !important;
+ max-height: none !important;
+ overflow: visible !important;
+ }
+
+ #scroll-container {
+ height: auto !important;
+ max-height: none !important;
+ overflow: visible !important;
+ overflow-y: visible !important;
+ overflow-x: visible !important;
+ }
+
+ /* Hide the jump to latest button during printing */
+ #jump-to-latest {
+ display: none !important;
+ }
+
+ /* Hide the thinking indicator during printing */
+ .thinking-indicator {
+ display: none !important;
+ }
+
+ /* Hide the loading indicator during printing */
+ .loading-indicator {
+ display: none !important;
+ }
+
+ /* Ensure welcome box prints properly if visible */
+ .welcome-box {
+ page-break-inside: avoid;
+ }
+ }
+ `;
constructor() {
super();