Run button: play icon beside the copy button; always clear the load-state indicator#453
Open
nelsonlove wants to merge 3 commits into
Open
Run button: play icon beside the copy button; always clear the load-state indicator#453nelsonlove wants to merge 3 commits into
nelsonlove wants to merge 3 commits into
Conversation
…tate indicator The run button was a text button at the bottom right that could overlap the theme's copy button. It is now a play icon at the top right, with the copy button shifted left to make room. runCode also always calls finishBlock() now: interactive (REPL) executors call startBlock() themselves regardless of the useShell flag, so a shell-invoked language with an interactive executor left a permanently spinning load-state indicator (and its inset shadow) after every run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Two UI fixes:
Run button placement. The run button was a text button absolutely positioned at the bottom-right of the block, where it can collide with theme/plugin copy buttons. It's now a play icon (lucide, via
setIcon) at the top right — matching Obsidian's own code-block affordances — with the built-in copy button shifted left to make room.aria-labelpreserves the "Run" name for accessibility.Stuck load-state indicator.
runCodeonly calledfinishBlock()whenuseShellwas false, but interactive (REPL) executors callstartBlock()themselves regardless of that flag. Any shell-invoked language backed by an interactive executor therefore left a permanently spinning load-state indicator (with its inset shadow) after every run.finishBlock()is now called unconditionally when the executor resolves; it's idempotent for the non-interactive path.Testing
npm run buildpassesvisibleclass is removed🤖 Generated with Claude Code