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

Create another block for sb-starting-block: oik-sb/second-block #2

Closed
5 tasks done
bobbingwide opened this issue Sep 19, 2021 · 2 comments
Closed
5 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Sep 19, 2021

While converting oik, oik-bobbing-wide, oik-blocks, oik-css and other plugins to work correctly for multiple blocks registered from several block.json files and then to internationalize and localize, I discovered that I needed more code than originally developed for sb-starting-block.

Requirements

  • sb-starting-block to deliver more than one block: oik-sb/sb-starting-block and oik-sb/second-block
  • At least one should be server side registered ( oik-sb/sb-starting-block )
  • Each block to be registered with block.json using apiVersion:2
  • They should all be registered in the server
  • And have a reasonable number of supports attributes, including color and typography.
  • Each block should be internationalized, translated and localized for en_GB and bb_BB
  • Consider how easy it is to rename the following when cloned from the template:
    • plugin name
    • plugin slug
    • text-domain
    • block prefix
    • prefix for server functions
  • Code should be suitable for documenting the i18n / l10n approach.

Proposed solution

  • Add oik-sb/second-block, originally built using npx @wordpress/create-block
  • Update oik-sb/sb-starting-block
  • Update sb-starting-block.php with i18n and l10n logic
  • Add examples
  • Change oik-sb/second-block - removing CSS and adding several supports attributes - with slightly different values from oik-sb/sb-starting-block.
@bobbingwide bobbingwide self-assigned this Sep 19, 2021
@bobbingwide bobbingwide added the enhancement New feature or request label Sep 21, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
@bobbingwide bobbingwide changed the title Create another block for sb-starting-block and rename plugin Create another block for sb-starting-block: oik-sb/second-block Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
bobbingwide added a commit that referenced this issue Sep 22, 2021
@bobbingwide
Copy link
Owner Author

The src/README.md file is confusing. Unless you read it very carefully it's difficult to tell which npm command performs which task.
Update it then apply the changes to other plugins.

@bobbingwide
Copy link
Owner Author

The src/README.md was updated in f101b48, tagged as #3 not #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant