-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Polish code editor. #21643
Polish code editor. #21643
Conversation
Size Change: -300 B (0%) Total Size: 842 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out and this works well, definite improvement.
No problems on Windows 10 using latest Edge and Firefox 👍
A minor nit that I'll defer to you, I'd like a little padding between title and content boxes.
Thanks Marcus! I actually intentionally removed the spacing between the title and the body, in effort to eliminate borders. Borders pile up and become noise when there's enough of them, so I actualy prefer the simpler look. |
0bca58e
to
408e1a2
Compare
I appreciate the larger space for editing code. Nice work. I find the “editing code” indicator and the exit button a little random. They don’t feel intentional and almost look like they’re just floating in space. Probably outside the scope for this PR, but I’d love to see some basic syntax highlighting. And if we wanna get really fancy, some basic autocomplete/autoclosing for tags. |
I second everything Shaun said. Nice work!
Are these even necessary? |
I was just pointed to #17017 as a good list of aspects to address. For now I wanted to keep things simple and just address low-hanging fruit. But atleast crossposting to that thread is helpful.
They were designed to align with the editor box: But I see that isn't the case on larger screens. I'll do a little rethink.
As I recall, we didn't always have them, but we added them exactly because people found it difficult to switch away from this editor once they had activated it. I don't know if @mtias can recall further details, but I distinctly remember this being a thing we added intentionally to solve that problem. |
Oh, and CC: @mapk for that bit about whether the indicators were necessary, because I saw that addressed mentioned in the other ticket. |
408e1a2
to
a339b63
Compare
I massaged the positioning. Small: Medium: Large: As noted in this comment, the label and exit button were added for a reason. The reason can be revisited, of course, but I'd like for that to happen separately. |
#17017 outlines a number of ideas for how to improve the code editor. Syntax highlighting, line numbers, a custom sidebar, colors and so on. It also questions the "exit" button. What this PR does for now, outside of visual polish and a wider editing interface, is force code fonts for the entire window, making it clearer you're editing code. That addresses part of the issue, but not the whole issue. For that reason, I'd like to merge this as is and keep that ticket open for further improvements. |
Hi |
Hello @caban13 This pull request refreshes the code editor, which resizes to the viewport but has a maximum width of 1032px. This will land in WordPress 5.5. |
Thank for your answer. |
Fixes #21576.
This PR improves the code editor by embracing what it is, a code editor. That means a code font also for the title, and an editor that resizes to the viewport.
Before:
After:
It also removes a bunch of dead code.