Skip to content

Commit 64dc16e

Browse files
committed
Docs
1 parent 8aa7aa1 commit 64dc16e

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ If you don't remember the props required by some cljfx type, or if you don't kno
7979
;; ...etc
8080
```
8181

82+
You can also use help in a UI form that shows that same information, but is easier to search for:
83+
```clojure
84+
(cljfx.dev/help-ui)
85+
```
86+
Invoking this fn will open a window with props and types reference:
87+
![Help UI screenshot](help-ui.png)
88+
8289
### Improved error messages with spec
8390

8491
You can set validating type->lifecycle opt that will validate all cljfx component descriptions using spec and properly describe the errors:
@@ -169,6 +176,13 @@ Additionally, you can validate individual descriptions while developing:
169176
;; Success!
170177
```
171178

179+
### Cljfx component inspector
180+
181+
Using the same dev type->lifecycle opt, you also get cljfx component tree inspector that can be opened by pressing F12:
182+
![Inspector screenshot](inspector.png)
183+
184+
Inspector shows a live tree of components and their props. Open shortcut can be configured using `:inspector-shortcut` argument to `wrap-type->lifecycle` fn.
185+
172186
## Acknowledgments
173187

174188
Many thanks to [Clojurists Together](https://www.clojuriststogether.org/) for funding this work!

help-ui.png

90.3 KB
Loading

inspector.png

58.1 KB
Loading

src/cljfx/dev/ui.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
(cond
9191
(string? syntax)
9292
[{:fx/type :text
93-
:font {:family "monospace" :size 14}
93+
:style {:-fx-font-family "monospace" :-fx-font-size 13}
9494
:text syntax}]
9595

9696
(vector? syntax)
@@ -99,7 +99,7 @@
9999
(cond
100100
(string? x)
101101
{:fx/type :text
102-
:font {:family "monospace" :size 14}
102+
:style {:-fx-font-family "monospace" :-fx-font-size 13}
103103
:text x}
104104

105105
(vector? x)
@@ -110,7 +110,7 @@
110110
{::view
111111
{:fx/type :label
112112
:underline true
113-
:font {:family "monospace" :size 14}
113+
:style {:-fx-font-family "monospace" :-fx-font-size 13}
114114
:text-fill "#000e26"
115115
:on-mouse-entered
116116
{:fn #'hover-help-syntax-element

0 commit comments

Comments
 (0)