WordPress.org

Make WordPress Core

#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:

  1. 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.

  1. 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)

42467.patch (1.4 KB) - added by johneckman 20 months ago.
Patch to try to clarify the intent
42467-2.patch (2.8 KB) - added by johneckman 17 months ago.
Attempt to address the second paragraph on developer experience as well as the coding enhancements section

Download all attachments as: .zip

Change History (24)

This ticket was mentioned in Slack in #core by atachibana. View the logs.


21 months ago

This ticket was mentioned in Slack in #polyglots by presskopp. View the logs.


21 months ago

This ticket was mentioned in Slack in #core by mte90. View the logs.


21 months ago

#4 @jbpaul17
20 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.9.1

I believe the consensus when this was brought up in #core was to handle this in 4.9.1, I'll milestone it accordingly.

#5 @johnbillion
20 months ago

  • Component changed from General to Text Changes

#6 @johnbillion
20 months ago

  • Milestone changed from 4.9.1 to 4.9.2

#7 @johneckman
20 months 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.

@johneckman
20 months ago

Patch to try to clarify the intent

This ticket was mentioned in Slack in #core by melchoyce. View the logs.


20 months ago

#9 @dd32
18 months ago

  • Milestone changed from 4.9.2 to 4.9.3

Bumping to 4.9.3 due to 4.9.2s release

#10 @SergeyBiryukov
18 months 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.


18 months ago

#12 @SergeyBiryukov
18 months ago

  • Milestone changed from 4.9.3 to 4.9.4

#13 @melchoyce
18 months 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.

#14 @dd32
18 months ago

  • Milestone changed from 4.9.4 to 4.9.5

Bumping, 4.9.4 has been released.

#15 @johneckman
17 months 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.

@johneckman
17 months 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.


16 months ago

#17 @audrasjb
16 months ago

  • Keywords i18n-change added

Tagging with i18n-change for the next 4.9.5 minor release.

Last edited 16 months ago by audrasjb (previous) (diff)

#18 follow-up: @ocean90
16 months 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 @danieltj
16 months 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.


16 months ago

#21 @audrasjb
16 months ago

  • Milestone changed from 4.9.5 to 4.9.6

Bumping to 4.9.6 due to 4.9.5 beta release.

#22 @danieltj
16 months 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! :)

Note: See TracTickets for help on using tickets.