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

Block Build CLI output updates #37

Open
schlotterer opened this issue Aug 8, 2023 · 2 comments
Open

Block Build CLI output updates #37

schlotterer opened this issue Aug 8, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@schlotterer
Copy link
Contributor

  1. Use “wds” as the namespace permanently - this will simplify set up and make the bocks more portable within WDS builds

    1. Convert any current namespaces to wds
    2. remove any notes in the find and replace about blocks namespaces
    3. leave the namespace customization option but don’t promote it as a default
    4. train engineers to work with client agnostic names in the blocks
  2. Specific things to add to the cli functionality to be prebuilt:

    1. Auto generate block class via the block name and add it to the block
    2. get the block id and add it to the block
    3. setup some of the default gutenberg attributes https://www.advancedcustomfields.com/resources/blocks/
      1. anchor
      2. classname
      3. block align
    4. link back to the docks in each block
    5. Better escaping for attributes
@schlotterer schlotterer added the enhancement New feature or request label Aug 8, 2023
@itsamoreh
Copy link
Collaborator

Use “wds” as the namespace permanently - this will simplify set up and make the bocks more portable within WDS builds

I love this! Does anyone know the reason we do the find and replace per-project?

@khleomix
Copy link
Contributor

khleomix commented Aug 9, 2023

Even though the dynamic package naming approach might seem appealing, it's crucial to keep coding standards in mind. These standards recommend that functions within a theme should have namespaces aligned with the theme's name. Disregarding this guideline could potentially trigger a PHP CodeSniffer (phpcs) error stating that Namespaces declared by a theme/plugin should start with the theme/plugin prefix.

As an alternative, you could think about creating a child theme. This way, you could ensure consistent namespaces for both wd_f and wd_s. However, it's important to note that using wd_f and wd_s as parent themes doesn't align with their intended usage – they're designed as starter themes rather than parent themes.

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

3 participants