-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Tokamak DevTools extension for Chrome #255
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 🚫 Line should be 100 characters or less: currently 107 characters (
line_length
)
Generated by 🚫 Danger Swift against 086ae30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
# TokamakDevTools | ||
|
||
A description of this package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
View
tree, hover overViews
to highlight them, and click onViews
to view some basic info about them.Todo: