Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a DOM inspector panel, which toggles with F12 when running with
textual run --dev
dom_inspector_demo.webm
Features
Questions
priority
?action_toggle_inspector
to the app instance in an ad-hoc way, but I'm guessing it would be better to define it normally as a method. But what should it do if dev tools aren't enabled (maybe not even installed)? Raise an error, or do nothing?TEXTUAL_EDITOR
, but this may be a bit confusing since it sounds like the opposite ofVISUAL
, a common env var for specifying a graphical text editor, to be favored overEDITOR
.REACT_EDITOR
is what Create React App uses, and I thought about leaving it to use this, in the hopes that you may have set it to your preferred editor, but you may not prefer the same editor for both sorts of projects, so I think it's better to create an explicit separation.TEXTUAL_FRAMEWORK_EDITOR
would be clearer but quite verboseTEXTUAL_DEV_EDITOR
might be a good middle groundTodo
In addition to todo comments in the code, I have an external todo list, which I could share, but I'd want to clean it up first.
In short:
path
of aRuleSet
, which I implemented by monkey-patchingRuleSet.__init__
, and using tracebacks to extract thepath
variable like it's a heist movie.TooManyMatches
onquery_one(Input)
if you try to edit inline styles, and the calculator example app makes the "Inspect Element" button take up the entire inspector panel.