The new feature for viewing the field handles while editing entries is quite handy, but gets a little messy on Windows because its tied to the alt-key.
When pressing alt in Firefox on Windows, the Menu bar (File, Edit, View, ...) pops up and to hide it, you have to press alt again, which switches to field names again. This is a bit annoying as the entire page jumps everytime.
And pressing alt & tab on Windows to switch between apps triggers the feature as well and switches to field handles, which could be confusing for non-tech users. Also when switching back to the browser using alt-tab, the field handles stay, because the browser wasn't in focus, so the user still sees the field handles.
@timrosskamp is there another key/combo that would make more sense?
@brandonkelly I'm not really sure. There could always be a browser or os that uses specific keys, so trying to find an unoccupied key combo doesn't seem very straight forward.
Since field names and handle are usually not very long, a debug option could be added to the user, which displays both the name and the handle of the field inline. Then any users that have problems with the alt-key can enable to view the field handle always next to the name and everybody else can use the enhanced feature with the alt-key. Like this:
I'd recommend using CTRL: https://github.com/craftcms/cms/issues/5833 (or just showing it on mouseover?)
@timrosskamp Good point. As of the next release (3.5.3), the handle will _always_ be shown, but only when Dev Mode is enabled. And when you click on it, it will automatically copy the value to your clipboard.
Craft 3.5.3 is out now with that change.
Is there any way of disabling this even in devMode @brandonkelly ?
@bzin not currently… I considered making it a preference but I figured the vast majority of the time you’ll want it is when developing locally where Dev Mode should be enabled, and the vast majority of the time you _wouldn’t_ want it is on production where Dev Mode should absolutely not be enabled. So it sortof doubles as a reminder to disable Dev Mode in production.
Understood @brandonkelly, the reason why I asked if there was a way to disable it is that sometimes when discussing and presenting the CP we still want to have the devMode
enabled before this goes to a test
server.
With this I mean that sometimes we do have a server that is not the developer machine but has the devMode
set to true
.
Anyway, this is a great feature, I was always going back and forth to the Fields settings page or using the Fields Manager plugin overview to see the handles.
@bzin Thanks, that’s a good use case, but the developer could also change their ENVIRONMENT
variable in .env
from dev
to something else (disabling Dev Mode) before the presentation.
Yes, that's how I solve it but wanted to give feedback here. :)
@bzin Changed my mind and went ahead and made this a preference for the next release (see #6610).
Craft 3.5.4 is out now with the new user preference.
Most helpful comment
@bzin Changed my mind and went ahead and made this a preference for the next release (see #6610).