Page MenuHome

Text Editor UI: Small changes to headers
ClosedPublic

Authored by William Reynish (billreynish) on Sep 5 2019, 11:06 AM.

Details

Summary

Currently the Text Editor header is very crowded. Here's a patch to clean it up.

  • Register toggle is in the Text menu
  • Run Script and Refresh OSL become an icon buttons next to ID block

Diff Detail

Repository
rB Blender

Event Timeline

Use play icon for Run Script

Put Run button next to ID template

I'd:

  • Move Select menu after Viewfor consistency with other editors.
  • Move Live Edit from Text menu into Edit menu.
  • Move 'Run Script' to the bottom-bar, remove from header.
  • Leave 'Run Script' as text. A Play ▶️ icon communicates it can be paused/stopped, which is not the case for most add-ons that are not modals. And even for modals we can't detect when they stop.

I'd:

  • Move Select menu after Viewfor consistency with other editors.

Agreed, will do

  • Move Live Edit from Text menu into Edit menu.

Also agreed.

  • Move 'Run Script' to the bottom-bar, remove from header.

I tried it - that's what I did first. We could do that also. Only issue is that long file paths will push off screen. But probably it's ok

  • Leave 'Run Script' as text. A Play ▶️ icon communicates it can be paused/stopped, which is not the case for most add-ons that are not modals. And even for modals we can't detect when they stop.

Depends on previous - if in the footer, it works better as text.

Peter Fog (tintwotin) added a comment.EditedSep 5 2019, 1:34 PM

The Play icon is used for Run here in PyCharm - without any stop/pause 2. meaning:

The "Text" menu should be called "File" and be placed to the far left, because it's all file operations and it would be in consistency with all other apps:

The Play icon is used for Run here in PyCharm - without any stop/pause 2. meaning:

It's often used to run the server then it shows Restart, Pause, Stop. Video: https://www.youtube.com/watch?v=JLfd9LOdu_U

Maybe @Andrzej Ambroz (jendrzych) could be asked to come up with an alternative icon for "Run"/"Execute", so we can avoid the not-so-nice looking text buttons in header/footers?

In QtCreator, Pycharm, and in most ides/editors use a green play icon.
I think it may look great in green, so it's more easily recognizable at a glance. And more familiar to most developers.

Example of a 'Run Script' icon to resolve conflict with the 'Timeline Play Animation' icon.

Example of a 'Run Script' icon to resolve conflict with the 'Timeline Play Animation' icon.

I personally like the most the other one you posted on devtalk @Paul (Thirio), it's simpler and also more visually different from the neighbour ones.

@Alessio Monti di Sopra (a.monti) I agree it fits better in context.


And to put more emphasis on the play symbol you can add 'script-lines':

Prefer this icon since regular "play" icon is normally associated with play/pause, although it's not high priority to add the icon, it can be done later

----

There are security issues with having register & live-edit in sub-menus, however this can be handled separately.

This revision is now accepted and ready to land.Oct 31 2019, 3:56 PM

Personally, I'd use the Python Script symbol instead of a generic File icon:

Personally, I'd use the Python Script symbol instead of a generic File icon:

Notice tough that while a generic script icon could also work for Osl nodes, if we use a python one we would need to switch the icon depending on the file extension.
As I already said in Devtalk I think the update icon could work for osl (it's already used in the node editor) but I think Paul's solution would be better

Personally, I'd use the Python Script symbol instead of a generic File icon:

The icon on the left is more generic and communicates well enough that a script is being run,
as noted, it means we can re-use it for executing any kind of text file, so I don't think having the Python icon as part of this helps much.

Also, "run-script" action in other IDE's often uses a generic file+play button, so I think it's something developers will be more familier with.

VScode:


Run, but not play...

This revision was automatically updated to reflect the committed changes.

So are we keeping the Register toggle in a sub-menu? Not ideal IMO. You want to know at a glance if a script will run or not on startup.