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
"Run" button position #208
Comments
Hi, I tried your options 1 and 2 by custom CSS just after I send this issue and I was not happy with the result :-) I like the third option - the "play" icon but maybe place it at the left (before the code block). My proposals are there. I think that the first one is most "easy to do", the second one looks nice but it can break the design. The third one is good because you can put the position in the settings (left top, left bottom, ...) but it looks different and may make users upset :-) On the other hand, the third option can be always displayed (not just by hovering). As you wrote - the default option should be still available because a lot of users can be familiar/happy with this. Maybe not many users use one-line snippets. I have some powershells scripts for automating my daily tasks so I have some of them. |
Thanks for your proposals! I worry that the first one would hide the code. Maybe that's not as much of an issue if it's only visible on hover? The second one would be a good match with the running indicator! I think that the third option's positioning versatility is good, but I agree that users might dislike it because of the styling. We should also worry about accessibility -- to me, at least, they don't appear to be buttons, and that's very important to keep consistency across themes (i.e. we should be able to use the theme's "button" style) |
I just realized that we could also make an option to allow double-clicking on the box itself to run, rather than a visible button. What do you think? |
I thought about this too but I don't think it's a good idea. You can accidentally double-click and in that case, it would be unexpected behavior. |
I would prefer something like rust by example site Can take a look here: https://doc.rust-lang.org/stable/rust-by-example/primitives/literals.html#literals-and-operators |
I agree but this will change also the default behavior and design of Obsidian's copy button. |
I made a temporary solution with custom CSS for myself. It's ugly (I am too lazy to solve all CSS issues so I override them by "!important") but I can live with it :-)
|
That's true-- we can always make it available as an option, but maybe not a recommended one? |
I discovered that some other extensions also change the default copy button style so it can be messy in general :-) |
Please add position of the "Run" button into the settings. In case of short (one or two-line) snippet/code it overlays the "Copy" button:
The text was updated successfully, but these errors were encountered: