WordPress / WordPress/Learn

Feedback - Error in lesson "Create custom inspector panel controls"

Open Beginner friendly
#3,454 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Content] Feedback
Dominant language
PHP
Stars
333
Forks
127
Avg merge
1d 7h
Merged PRs (30d)
11

Description

Type of feedback

//content

Description

Content URL:
https://learn.wordpress.org/lesson/create-custom-inspector-panel-controls/

Are you reporting an error or providing other feedback?
Providing feedback (such as an idea for improvement)

What are you reporting?
When attempting to apply the column-count CSS property, the style was not being rendered on the front-end element. I resolved this in the save() function within save.js by changing const columnStyles = { columnCount } to const columnStyles = { 'column-count': columnCount.toString() }.

It is necessary to use the toString() method because automatically appends a px unit to integer values. I don't know if is only in my environment.

Other information (optional)

Reported in HS issue 3230478703

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lesson at https://learn.wordpress.org/lesson/create-custom-inspector-panel-controls/ and inspect the save.js save() function mentioned in the report. Reproduce the column-count example and verify that the front-end element renders the style correctly without an unintended px unit. Done means the lesson’s code or guidance reflects the confirmed working behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
content, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.