WordPress / Learn

WordPress.org Learn - The canonical source for the code and content behind https://learn.WordPress.org
276 stars 101 forks source link

Feedback - Enhance Syntax Highlighting on the course content #2487

Open laxmariappan opened 5 months ago

laxmariappan commented 5 months ago

Type of feedback

//content

Description

Can we enhance the syntax highlighting on the training content?

Step-by-step reproduction instructions (optional)

Go to https://learn.wordpress.org/lesson/accessing-wordpress-data/ You can view a couple of code blocks They have both JS and PHP code. But as a reader I find it hard to differentiate code

Screenshots or screen recording (optional)

Without highlighting on the page:

image

Demo of syntax highlighting

image

Other information (optional)

jonathanbossenger commented 5 months ago

@laxmariappan thanks for logging this.

This is a known issue that's related to the current classic theme that Learn.WordPress.org uses.

As we're busy developing a new block theme, once the new theme launches, this issue should be resolved.

cc @adamwoodnz it would be great if we could confirm that the code block syntax highlighting works as expected for lessons when the new theme is developed.

adamwoodnz commented 5 months ago

As we're busy developing a new block theme, once the new theme launches, this issue should be resolved.

cc @adamwoodnz it would be great if we could confirm that the code block syntax highlighting works as expected for lessons when the new theme is developed.

Thanks, I'll add it to the redesign project.

StevenDufresne commented 4 months ago

@jonathanbossenger I updated the code block language on the code block in the lesson plan and it looks like its working.

Is there something different expected?

Settings After Save
Screenshot 2024-06-25 at 12 42 13 PM Screenshot 2024-06-25 at 12 49 13 PM

Video: https://d.pr/i/Ztmy5K

jonathanbossenger commented 4 months ago

Ah, my apologies folks, I was confusing the ability to highlight lines of code within the code block (which we don't have), with the ability to show syntax highlighting for specific languages, which we do have.

Thanks for picking this up @StevenDufresne, I'll make a note to update the code snippets in that course, and then close this ticket once that's done.