Skip to content

WordPress devhub blueprint  #44

Open

Description

@carstingaxion

I’d like to see (and maybe start working on) a blueprint that replicates the WordPress devhub for a custom plugin. As a real use-case I’d like to explore creating developer.gatherpress.org with the phpdoc-parser running against the plugin code of GatherPress.

Activity

  1. carstingaxion commented on May 6, 2024

    @carstingaxion
    Author

    Hello @dmsnell ,

    did you explore this dmsnell/phpdoc-parser@bda7e06 any further?

    I would like to know, how things went.
    I’m sorry for pinging you like this and would appreciate if you could take a minute.

    Thanks Carsten

  2. adamziel commented on May 13, 2024

    @adamziel
    Contributor

    This would be lovely! I've heard a local setup can be quite challenging. Although that doesn't address the devhub issue, I have some early explorations going for a GitHub-based documentation site workflow: https://github.com/adamziel/playground-docs-workflow

  3. dmsnell commented on May 15, 2024

    @dmsnell
    Member

    @carstingaxion I haven't pushed that any further along, but would love some help!

  4. flexseth commented on May 24, 2024

    @flexseth

    There is a GitHub token required - for Composer - to make the DevHub local setup work properly, otherwise this seems feasible and helpful!

    question: What happens if there are manual steps needed for a blueprint to function? 🤯

  5. carstingaxion commented on May 31, 2024

    @carstingaxion
    Author

    This would be lovely! I've heard a local setup can be quite challenging.

    You heard right. It’s not my first attempt and it is … challenging.

    Although that doesn't address the devhub issue, I have some early explorations going for a GitHub-based documentation site workflow: https://github.com/adamziel/playground-docs-workflow

    Yes this is indeed cool and could help, thank you @adamziel

    Luckily this came already to my attention and is even more cool as it could help preparing a playground with the goal to create and manage demo content for a plugin or theme, that will be saved back to a given repo. I guess @ndiego is working on something similar and me too.

  6. carstingaxion commented on May 31, 2024

    @carstingaxion
    Author

    @carstingaxion I haven't pushed that any further along, but would love some help!

    Thank you for stopping by @dmsnell and sorry for being that late with my reaction.

    I started exploring the idea at https://github.com/carstingaxion/gatherpress-devhub, which currently has 2 branches. Getting the parser to run on the GatherPress code and within the playground worked … somehow and was the first branch.

    The second branch houses the absolutely not pleasing experiments or hacks to get the theme running, which didn’t worked yet. Also, but not exclusively because of the composer token @flexseth mentioned. I struggled with that too.

  7. ndiego commented on May 31, 2024

    @ndiego
    Member

    Luckily this came already to my attention and is even more cool as it could help preparing a playground with the goal to create and manage demo content for a plugin or theme, that will be saved back to a given repo. I guess @ndiego is working on something similar and me too.

    I imagine a world where most WordPress developers have their own little collection of blueprints that suit their specific needs.

  8. carstingaxion commented on May 31, 2024

    @carstingaxion
    Author

    I imagine a world where most WordPress developers have their own little collection of blueprints that suit their specific needs.

    I imagine a world where most WordPress developers share a common collection of blueprints that suits typical needs.

  9. carstingaxion commented on May 31, 2024

    @carstingaxion
    Author

    Making a well-known, nice designed and well structured documentation (website) available to every plugin author with the help of playground could be our take on number 5 of @m|s birthday opinions.

    Every plugin and theme should have all the infrastructure that we use to build WordPress itself—version control, bug trackers, forums, documentation, internationalization, chat rooms, P2, and easy pathways for contribution and community. We shouldn’t be uploading ZIPs in 2024!

  10. carstingaxion commented on Aug 15, 2024

    @carstingaxion
    Author

    Now that I‘ve found your installation error description @flexseth and the solution to that directly next door in an open issue, I can and will go on moving this forward.

  11. flexseth commented on Aug 15, 2024

    @flexseth

    @carstingaxion - FWIW, the issue I think stems from some type of propagation with GitHub's tokens needed to boot up DevHub. Following the given instructions (at least when I last tried) for the DevHub setup, you will get an error if you attempt to boot up the environment immediately after completing the steps.

    However, if you wait about 10 minutes or so, it seems to work as expected when attempting to boot.

    That said, I don't know that it's possible, without putting some type of timeout in the blueprint.

    Here's how that might can work:

    1. Create the blueprint based on existing instructions, except do not boot the environment
    2. Throw an alert that the user needs to wait for the token to propagate
    3. Add a step to set a timer in PHP for 10 minutes
    4. Run the final step to boot up the environment via shell
    5. Go to WP Admin (an onboarding screen might be very helpful)

    Testing your blueprint

    In order to test if the blueprint is working correctly working, you'd need to delete the token before trying to run again?

    Awesome idea!!

  12. carstingaxion commented on Aug 15, 2024

    @carstingaxion
    Author

    Wow. Thank you very much for your detailed answer @flexseth !

    I will go through your ideas and give it a try.

    Today I just skipped the whole build process and used the final built repos, which works fine, but for sure is not a good place to start contributing from as you wanted.

    If you don't worry about 180sec TTFB, have a look: https://playground.wordpress.net/builder/builder.html?blueprint-url=https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/WIP/use-build-deps/blueprint.json

  13. flexseth commented on Aug 17, 2024

    @flexseth

    @carstingaxion - wow I didn't even think to use the full build, will look into that. Thanks for the blueprint, saving for later!

  14. carstingaxion commented on Aug 20, 2024

    @carstingaxion
    Author

    @flexseth: wow I didn't even think to use the full build, will look into that. Thanks for the blueprint, saving for later!

    I took it one step further by additionally using Playgrounds Export & Import as .zip-feature.

    This brought the TTFB down to approx. 3 seconds. And because this is not any website, but a code-reference. it would be totally ok to run all of this as a workflow once per release. Export & Upload are done manually for now, but this could easily be done by the Github action workflow as well.

    This is getting closer to something useful, give it a try: https://playground.wordpress.net/?mode=seamless&blueprint-url=https://raw.githubusercontent.com/carstingaxion/gatherpress-devhub/WIP/use-build-deps/blueprint-import.json

  15. flexseth commented on Aug 21, 2024

    @flexseth

    @carstingaxion - If you could simplify the blueprint to just load up DevHub and the necessary requirements to work in that environment, that might be helpful as part of the Blueprints Gallery

    Make post

    Following for the final product!

  16. moved this from Inbox to Needs review in Playground Boardon Sep 16, 2024
  17. moved this from Needs review to Inbox in Playground Boardon Sep 16, 2024
  18. moved this from Inbox to No status in Playground Boardon Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions