statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

Adding fullscreen and ruler support to the code fieldtype #1021

Closed petemolinero closed 3 months ago

petemolinero commented 11 months ago

If a site uses the code fieldtype extensively at all it can feel a bit small. Adding the ability to fullscreen it is a supported CodeMirror feature and is unobtrusive. I think it should be a great addition to core.

Also, if a developer is working in it, it can be nice to have rulers that indicate conventional line length limits (80 char soft limit, 120 char hard limit). I think it the code fieldtype could have an option to display or hide rulers, with hidden being the default setting. This feature is already supported by CodeMirror as well.

I've already developed a PR for this just to understand whether it was possible and how hard it would be.

petemolinero commented 11 months ago

Pressing F11 to toggle fullscreen

fullscreen-and-rulers

duncanmcclean commented 3 months ago

Closing since the related PR has been merged, https://github.com/statamic/cms/pull/8509.