Skip to content
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

Fix/block directory #29

Merged
merged 3 commits into from
Nov 23, 2021
Merged

Fix/block directory #29

merged 3 commits into from
Nov 23, 2021

Conversation

jeffpaul
Copy link
Member

Description of the Change

In running the plugin thru the Block Plugin Checker, there were some issues flagged:

Screen Shot 2021-11-18 at 10 31 40 PM

This PR updates to the expected block.json metadata and also updates some stray GitHub repo links to the correct name.

Alternate Designs

n/a

Benefits

Ensures the plugin can appear in the Block Directory

Possible Drawbacks

none identified

Verification Process

Run the plugin thru the Block Checker and see that issues are resolved

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

n/a

Changelog Entry

Fixed - block.json errors limiting appearance in Block Directory.

@jeffpaul jeffpaul added this to the 1.1.0 milestone Nov 19, 2021
@jeffpaul jeffpaul requested a review from fabiankaegy November 19, 2021 04:50
@jeffpaul jeffpaul self-assigned this Nov 19, 2021
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffpaul in this case the block directory check is actually incorrect.

The apiVersion value needs to be an integer as defined here in the Schema:
https://github.com/WordPress/gutenberg/blob/d718cb0ae5571e9c6199a7eaacf8f063804f7d52/schemas/json/block.json#L18-L23

The script value can either be a path to a js file or the name of a js handle when the script is registered via wp_register_script

block.json Outdated
"editorScript": "file:./build/index.js",
"editorStyle": "file:./build/index.css",
"script": "winamp-block-frontend",
"script": "winamp-block-frontend.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will not work as the winamp-block-frontend string refers to the handle the script was registered under.

@jeffpaul jeffpaul requested a review from fabiankaegy November 23, 2021 04:39
@jeffpaul jeffpaul merged commit 8ed249d into develop Nov 23, 2021
@jeffpaul jeffpaul deleted the fix/block-directory branch November 23, 2021 17:20
@jeffpaul jeffpaul modified the milestones: 1.1.0, 1.0.1 Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants