From 19547d3c5fcbc0205949954d87247859998f9b65 Mon Sep 17 00:00:00 2001 From: Kamil Patryk Kozakowski Date: Sat, 20 Jun 2026 06:16:12 +0200 Subject: [PATCH] better html tooltip styling --- .../src/main/resources/html/template.html | 17 +++++++++++++++++ .../html/HtmlExporterTest.java | 7 ------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/state_machine_exporter_html/src/main/resources/html/template.html b/state_machine_exporter_html/src/main/resources/html/template.html index 7b44a4e..6b17562 100644 --- a/state_machine_exporter_html/src/main/resources/html/template.html +++ b/state_machine_exporter_html/src/main/resources/html/template.html @@ -238,9 +238,26 @@ .tooltip-content { padding: 20px; max-width: 500px; + max-height: 60vh; + overflow-y: auto; word-break: break-word; overflow-wrap: anywhere; } + + /* Custom Scrollbar for Tooltips */ + .tooltip-content::-webkit-scrollbar { + width: 6px; + } + .tooltip-content::-webkit-scrollbar-track { + background: transparent; + } + .tooltip-content::-webkit-scrollbar-thumb { + background: #cbd5e1; + border-radius: 4px; + } + .tooltip-content::-webkit-scrollbar-thumb:hover { + background: #94a3b8; + } .payload-box { background: #0f172a; diff --git a/state_machine_exporter_html/src/test/java/click/kamil/springstatemachineexporter/html/HtmlExporterTest.java b/state_machine_exporter_html/src/test/java/click/kamil/springstatemachineexporter/html/HtmlExporterTest.java index aa403a4..5d17dcb 100644 --- a/state_machine_exporter_html/src/test/java/click/kamil/springstatemachineexporter/html/HtmlExporterTest.java +++ b/state_machine_exporter_html/src/test/java/click/kamil/springstatemachineexporter/html/HtmlExporterTest.java @@ -81,13 +81,6 @@ public class HtmlExporterTest { // 7. Assertions - Surgical SVG Identification // Every event should be wrapped in an identifying hyperlink for robust JS selection - java.nio.file.Files.writeString(java.nio.file.Paths.get("debug_html.html"), html); - - click.kamil.springstatemachineexporter.exporter.ExportOptions plantUmlOptions = click.kamil.springstatemachineexporter.exporter.ExportOptions.builder() - .embedIdentifiers(true) - .build(); - click.kamil.springstatemachineexporter.exporter.PlantUml pumlExporter = new click.kamil.springstatemachineexporter.exporter.PlantUml(); - java.nio.file.Files.writeString(java.nio.file.Paths.get("debug_puml.puml"), pumlExporter.export(result, plantUmlOptions)); assertThat(html).contains("__CREATE"); assertThat(html).contains("__ASSIGN");