Opened 7 years ago
Closed 7 years ago
#42467 closed enhancement (maybelater)
CodeMirror description in About Page String
Reported by: | atachibana | Owned by: | melchoyce |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9 |
Component: | Text Changes | Keywords: | |
Focuses: | Cc: |
Description
Beloow sentence is from wp-admin/about.php
We’ve introduced a new code editing library, CodeMirror, for use within core. Use it to improve any code writing or editing experiences within your plugins, like CSS or JavaScript include fields.
I think there are 2 issues:
- Unclear sentence 'like CSS or JavaScript include fields'
This is about using CodeMirror for input fields. Input fields that are used to edit CSS, JavaScript, or similar.
But it is a bit hard to read.
- Conflict message with other feature
In Version 4.9, We introduced Warning prompt against direct edit of themes/plugins, but above sentence sounds we are recommending direct edit of CSS or JavaScript of Plugins.
I think We should use HTML widget as an example of CodeMirror.
fyi. Below is the feature text of 'Warning: Potential Danger Ahead!' in about.php.
When you edit themes and plugins directly, WordPress 4.9 will politely warn you that this is a dangerous practice. It will recommend that you backup your files before saving, so they don’t get overwritten by the next update. Take the safe route: your future self will thank you. Your team and customers will thank you.
Attachments (2)
Change History (24)
This ticket was mentioned in Slack in #core by atachibana. View the logs.
7 years ago
This ticket was mentioned in Slack in #polyglots by presskopp. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by mte90. View the logs.
7 years ago
#7
@
7 years ago
- Keywords has-patch added; needs-patch removed
Trying to find the right balance here - want to let people know (as the Developer Happiness section does: https://wordpress.org/news/2017/11/tipton/ ) that Code Mirror isn't *just* used in the Custom HTML widget, but also let them know how it helps a non-developer user.
How's this? (will make text into a patch shortly):
If you’ve ever had a need to edit CSS, HTML, or JavaScript from within the WordPress dashboard, you know how easy it can be to miss syntax errors or other problems. That's why we’ve introduced a new code editing library which allows for syntax highlighting, error checking, and validation. You’ll be able to scan code, identify potential issues, and fix errors quickly. This new library is used by the Custom HTML widget (introduced in WordPress 4.8.1), but developers will also be able to use this library wherever they provide code writing or editing experiences.
This ticket was mentioned in Slack in #core by melchoyce. View the logs.
7 years ago
#10
@
7 years ago
- Owner set to melchoyce
- Status changed from new to assigned
42467.patch changes the "Syntax Highlighting and Error Checking? Yes, Please!" block, but doesn't seem to address the issues with CodeMirror paragraph in the Developer Happiness section outlined in the ticket desciption.
@melchoyce: Could you take a look?
This ticket was mentioned in Slack in #core-customize by melchoyce. View the logs.
7 years ago
#13
@
7 years ago
Yeah, seems like we're combining this blurb from Coding Enhancements:
Syntax Highlighting and Error Checking? Yes, Please!
You’ve got a display problem but can’t quite figure out exactly what went wrong in the CSS you lovingly wrote. With syntax highlighting and error checking for CSS editing and the Custom HTML widget introduced in WordPress 4.8.1, you’ll pinpoint coding errors quickly. Practically guaranteed to help you scan code more easily, and suss out & fix code errors quickly.
And this blurb from Developer Happiness:
CodeMirror available for use in your themes and plugins
We’ve introduced a new code editing library, CodeMirror, for use within core. CodeMirror allows for syntax highlighting, error checking, and validation when creating code writing or editing experiences within your plugins, like CSS or JavaScript include fields.
The issue in this ticket seems to be about the latter blurb, clarifying what "like CSS or JavaScript include fields" means.
The intent with that sentence was to show where CodeMirror could be used. For example, if you're a theme author, and you provide a place in your theme settings for someone to add JavaScript to your theme header, so folks using your themes can include font files or Google Analytics tracking codes.
#15
@
7 years ago
I have a feeling by the time we reach agreement it'll be time for 5.0 and this won't matter anymore, but let's try the attached.
Changes the first paragraph under Coding Enhancements to:
If you’ve ever had a need to edit CSS, HTML, or JavaScript from within the WordPress dashboard, you know how easy it can be to miss syntax errors or other problems. That’s why we’ve introduced a new code editing library which allows for syntax highlighting, error checking, and validation. You’ll be able to scan code, identify potential issues, and fix errors quickly. This new library is used by the Custom HTML widget (introduced in WordPress 4.8.1), but developers will also be able to use this library wherever they provide code writing or editing experiences.
Changes the paragraph under Developer Happiness to:
We’ve introduced a new code editing library, CodeMirror, for use within core. Use it to improve any code writing or editing experiences within your plugins. For example, as a theme author, you could provide a place in your theme settings for someone to add JavaScript or CSS to your theme output, so folks using your theme can include font files or tracking codes. Lean more about WP_Customize_Code_Editor_Control
With a link to https://developer.wordpress.org/reference/classes/wp_customize_code_editor_control/
I suppose the first paragraph (from Coding Enhancements) could also point out it is used in the customizer additional CSS as well as in theme editor and plugin editor, but I don't think that's necessary.
@
7 years ago
Attempt to address the second paragraph on developer experience as well as the coding enhancements section
This ticket was mentioned in Slack in #core by danieltj. View the logs.
7 years ago
#18
follow-up:
↓ 19
@
7 years ago
- Keywords 2nd-opinion added
WordPress 4.9 has been released 4 months ago. Do you still think that there are enough people reading the about page in detail which justifies the change and the resulting work for translators of these two bigger strings?
#19
in reply to:
↑ 18
@
7 years ago
Replying to ocean90:
WordPress 4.9 has been released 4 months ago. Do you still think that there are enough people reading the about page in detail which justifies the change and the resulting work for translators of these two bigger strings?
Whilst I think you're right, many people may not read the about page as in-depth as they would when 4.9 landed, I think the sentences needs an update because they currently don't make sense as is.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
7 years ago
#22
@
7 years ago
- Keywords has-patch i18n-change 2nd-opinion removed
- Milestone 4.9.6 deleted
- Resolution set to maybelater
- Status changed from assigned to closed
As per today's bug scrub, closing this as whilst it could do with some improvements here; it may not stay the same for long with newer versions being released. Nonetheless, we can reopen and revisit this issue later on if we can come to a final conclusion in time for a release.
Thank you to everyone who has contributed so far! :)
I believe the consensus when this was brought up in #core was to handle this in 4.9.1, I'll milestone it accordingly.