Add Tokamak DevTools extension for Chrome#255
Conversation
# Conflicts: # Sources/TokamakCore/Modifiers/FlexFrameLayout.swift # Sources/TokamakCore/Modifiers/ModifiedContent.swift # Sources/TokamakCore/Tokens/Color.swift # Sources/TokamakCore/Views/Text/Text.swift # Sources/TokamakDemo/TokamakDemo.swift # Sources/TokamakStaticHTML/Views/Containers/List.swift
| // OutlineGroup(tree.root, children: onlyComposite ? \.compositeChildren : \.children) { | ||
| // Text(String($0.type.split(separator: "<").first!)) | ||
| // .foregroundColor($0.isPrimitive ? .primary : ($0.isHost ? .green : .blue)) | ||
| // .font(.system(size: 12, weight: $0.isPrimitive ? .regular : .bold, design: .monospaced)) |
There was a problem hiding this comment.
- 🚫 Line should be 100 characters or less: currently 107 characters (
line_length)
Generated by 🚫 Danger Swift against 086ae30 |
| # TokamakDevTools | ||
|
|
||
| A description of this package. |
There was a problem hiding this comment.
Or alternatively, could you replace this with a description of how to install the extension in Chrome/Firefox?
| ) | ||
| self.nodes = changes.union(self.nodes) | ||
| self.traverse() | ||
| return .undefined |
There was a problem hiding this comment.
This is unrelated but it would be cool to add an overload to JSClosure that takes a closure with a Void return type and wraps it to return .undefined.
| .font(.system(size: 13, weight: weight, design: .monospaced)) | ||
| .onHover { | ||
| if let target = node.target { | ||
| if $0 { |
There was a problem hiding this comment.
Can you give this a clearer name or is $0 the convention here?
| if $0 { | |
| if isHovered { |
| import XCTest | ||
|
|
||
| import TokamakDevToolsTests | ||
|
|
||
| var tests = [XCTestCaseEntry]() | ||
| tests += TokamakDevToolsTests.allTests() | ||
| XCTMain(tests) |
There was a problem hiding this comment.
Are you planning to use tests for the devtools? If not can you remove them?
The tool itself is written in Tokamak. The extension might work in Firefox too, but I haven't tried it. So far it lets you browse the
Viewtree, hover overViewsto highlight them, and click onViewsto view some basic info about them.Todo: