From 6433da508a3a33b2ee7fb47280e3c221924d1478 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 11 May 2024 12:19:34 -0500 Subject: [PATCH] Unique ids for booleans in values and improved visualization. --- src/MiniDocs/Dictionary.extension.st | 6 ++++++ src/MiniDocs/OrderedDictionary.extension.st | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 src/MiniDocs/Dictionary.extension.st diff --git a/src/MiniDocs/Dictionary.extension.st b/src/MiniDocs/Dictionary.extension.st new file mode 100644 index 0000000..f711824 --- /dev/null +++ b/src/MiniDocs/Dictionary.extension.st @@ -0,0 +1,6 @@ +Extension { #name : #Dictionary } + +{ #category : #'*MiniDocs' } +Dictionary >> treeView [ + ^ self asOrderedDictionary treeView +] diff --git a/src/MiniDocs/OrderedDictionary.extension.st b/src/MiniDocs/OrderedDictionary.extension.st index b15b516..7a83e28 100644 --- a/src/MiniDocs/OrderedDictionary.extension.st +++ b/src/MiniDocs/OrderedDictionary.extension.st @@ -48,7 +48,7 @@ OrderedDictionary >> replaceNilsWith: aCharacter [ { #category : #'*MiniDocs' } OrderedDictionary >> replaceWithUniqueNilsAndBooleansStartingAt: anInteger [ - | totalNils shortUID newArray | + | totalNils shortUID | totalNils := self flattened asDataSeries countNils. shortUID := [NanoID generate copyFrom: 1 to: 3]. self associations doWithIndex: [:assoc :i | | subIndex | @@ -73,7 +73,7 @@ OrderedDictionary >> treeView [ border: (BlBorder paint: Color black); geometry: BlEllipseGeometry new; layout: (BlLinearLayout new alignCenter); - addChild: (BlTextElement text: (x asRopedText fontSize: 17)) ]; + addChild: (BlTextElement text: (x asRopedText fontSize: 10)) ]; with: (self flatCollectAsSet: #yourself) , self keys. view edges stencil: [ :x | BlLineElement new border: (BlBorder paint: (Color blue alpha: 0.5) width: 4) ];