I'm interested in creating a p5.js module and am writing a custom one currently for my website. Please contact me if you are interested in collaborating on making it a project for Drupal.
- 🇺🇸United States mradcliffe USA
Sure. I would be happy to help you get your p5.js contributed into this module, and then hand over maintainership.
Do you an idea or plan about how to replace p5.js?
You could create an issue fork to add .gitlab-ci.yml and then start replacing and refactoring until it passes tests. A Nightwatch test might be useful.
p5.js license is more-compatible with Drupal than processing.js's so that may make it easier.
Although i started from this module, the project has really diverged to the point, i'm not sure how related it is. But i've never written a module before. I don't really know php that well. And I'm not even that familiar with the last 4 versions of Drupal.
I do have a working version of a P5.js module, i'm close to finishing . The main module has display code with a formatter. There are two submodules, one for sketches as a media type, and the other as a filter, which is what is based on the processing.js module.
the p5 code is formatted to output to a script tag in an iframe with the p5.js library attached. there is a js controller in the main page and in the iframe to coordinate resizing to be responsive.
there are modes (like this module): code first, sketch first, sketch only -- i added a mode that is sketch only with the code obfuscated. there is animation for switching between code and sketch.
there are display options that effect resizing and can add a fullscreen mode.
default mode and options can be selected with settings. if the allow override option is selected, there is a way to specify mode and options in attributes of the short tag, or in a comment in the case of the media entity.
i don't really know how to write unit tests. i've tried to work on that a little, but need some assistance. and though i think it's close to all working, i would really like other people to look at it and give some feedback. Not really sure about how to make that happen.
- 🇺🇸United States mradcliffe USA
Okay, thank you for telling me more about the p5js progress and being unfamiliar with tests. That is okay.
I think that given your progress so far, we can come up with a plan to get things integrated into this project and so you can maintain it.
- I will create a 2.0.x branch that has some basic files updated so that GitLab CI can run
- I will create a p5js branch that will contain all of your progress so far, and ensure that you have Developer access on GitLab to push to that branch. This way we can do things like `git checkout ` to pull in files.
- I will create 3 issues
- Issue 1: we/you will get a merge request to merge the "display code and formatter", "js controller" into the main module from p5js branch into 2.0.x branch.
- Issue 2: we/you will get a merge request to move/merge the "filter" into the filter sub-module from p5js branch into 2.0.x branch
- Issue 3: we/you will get a merge request to move/ the sketches media sub-module from p5js branch into 2.0.x branch
- We can setup a regular thread in Drupal Slack to talk about things. I don't know if we want to do weekly or what, but if we create the thread in #contribute or #maintainers we can chat publicly and possibly get more review and help. This could also help you get elevated access as a maintainer for security opt-in.
I can help write tests.
What do you think?
As it is now, the module has a different name, "p5js" -- and it doesn't support processing.js (but of course, names can be changed, and i suppose it could be modified to support both?). So it's worth thinking about if it makes sense for it to be part of this, or different module.
i'm new to git. haven't used slack, or GitLab, i haven't ever maintained a module - or made software for someone else to use for that matter. so doing all this stuff would take some time for me to figure out.
maybe getting on slack would be a place to start.
- 🇺🇸United States mradcliffe USA
Don't worry about it. We all start somewhere.
Yes, the first step would be to ensure you can connect to Drupal Slack: https://drupal.org/slack
For getting started with GitLab and Git in general, I would look at the Create a merge request for an issue → task in the Community Contributor's Guide. The "Using Git" link on that page also has a bunch of reference information for using Git and GitLab.
Specifically
- Using Git to contribute to drupal →
- Using GitLab to contribute to drupal →That should lead you to setting up your user account and profile no drupal.org.,
There are also some videos about contribution if you prefer video format provided by the Drupal mentoring - https://www.youtube.com/playlist?list=PLNBrKoO2qYDXKqX_J1gLBrILRTwRzooDr, It is a bit out-of-date though.
- 🇺🇸United States mradcliffe USA
I created the child issues.
Once you know a little bit more about Git and GitLab, go into 📌 Adds p5js display code, formatter and js controller Active , and create an issue fork.