From cd09efca942bf60843d1ad70fa3a6c60049fdbe9 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 24 Jan 2022 01:41:57 +0100 Subject: [PATCH] Small styling tweaks --- UI/Base/Toggleable.ts | 5 +++-- UI/ImportFlow/PreviewPanel.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/UI/Base/Toggleable.ts b/UI/Base/Toggleable.ts index e7bdccbdc..0d5b941cd 100644 --- a/UI/Base/Toggleable.ts +++ b/UI/Base/Toggleable.ts @@ -27,7 +27,7 @@ export default class Toggleable extends Combine { constructor(title: Title | BaseUIElement, content: BaseUIElement) { super([title, content]) - content.SetClass("animate-height border-l-4 pl-2") + content.SetClass("animate-height border-l-4 pl-2 block") title.SetClass("background-subtle rounded-lg") const self = this this.onClick(() => self.isVisible.setData(!self.isVisible.data)) @@ -53,7 +53,8 @@ export default class Toggleable extends Combine { this.isVisible.addCallbackAndRun(isVisible => { if (isVisible) { - contentElement.style.maxHeight = "100vh" + contentElement.style.maxHeight = "8gs0vh" + contentElement.style.overflowY = "auto" contentElement.style["-webkit-mask-image"] = "unset" } else { contentElement.style["-webkit-mask-image"] = "-webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)))" diff --git a/UI/ImportFlow/PreviewPanel.ts b/UI/ImportFlow/PreviewPanel.ts index 637648d92..2cf25d576 100644 --- a/UI/ImportFlow/PreviewPanel.ts +++ b/UI/ImportFlow/PreviewPanel.ts @@ -54,7 +54,7 @@ export class PreviewPanel extends Combine implements FlowStep<{ features: { prop } const uniqueCount = new Set(values).size - if (uniqueCount !== values.length) { + if (uniqueCount !== values.length && uniqueCount < 15) { attributeOverview.push() // There are some overlapping values: histogram time! let hist: BaseUIElement = @@ -84,7 +84,7 @@ export class PreviewPanel extends Combine implements FlowStep<{ features: { prop continue } - // All values are different, we add a boring (but collapsable) list + // All values are different or too much unique values, we add a boring (but collapsable) list attributeOverview.push(new Toggleable( new Title(key + "=*"), new Combine([