Skip to content

Adopt the wpgenius plugin standard and commit bundled libraries - #23

Merged
MakarandMane merged 1 commit into
mainfrom
repo-standard
Nov 15, 2026
Merged

MakarandMane merged 1 commit into
mainfrom
repo-standard

Conversation

@MakarandMane

Copy link
Copy Markdown
Member

Brings StackFolio up to the wpgenius plugin standard (from wpgenius/wordpress-plugin-boilerplate at 8e5e3a3) and fixes the bundled libraries missing from the repo.

Changes

#13 Standard ignore files

  • .gitignore and .distignore are the standard's, followed by StackFolio's own rules.
  • .distignore keeps blocks/ in the zip. The block is plain JavaScript with no build step, so blocks/album-grid/ is runtime code, not source.

#14 Automatic releases

  • release.yml and .github/scripts/ copied as-is. readme.txt already had Stable tag: 1.0.0 and a Changelog section.

#15 Deploy workflow (WordPress.org SVN, off by default)

  • deploy.yml copied as-is. Repo variables: DEPLOY_METHOD=wporg, DEPLOY_ENABLED=false.

#16 Linked issue check on PRs

  • linked-issue.yml copied as-is. REQUIRE_LINKED_ISSUE=true.

#17 Dependabot for GitHub Actions

  • .github/dependabot.yml copied as-is.

#18 GitHub setup script

  • bin/setup-github.sh copied as-is and run once: squash-only merges, release labels, private vulnerability reporting, the release-bot deploy key and the "Protect main" ruleset (Linked issue and CI required).

#19 Tooling: CI, coding standards, PHPStan and local Docker

  • ci.yml adapted to StackFolio. Jobs: PHP 7.4–8.5 syntax and unit tests, PHPCS, PHPStan (level 5), JS/CSS lint, Plugin Check. No block-build, integration-test or rename jobs, since StackFolio has none of those.
  • composer.json, phpcs.xml.dist (stackfolio text domain and prefixes, assets/vendor/ excluded), phpstan.neon.dist with Elementor stubs, phpunit.xml.dist, and unit tests for video-link parsing and album ID parsing.
  • package.json with lint scripts only.
  • Local Docker: docker-compose.yml, .docker/, .env.example, .nvmrc.
  • Lint fixes in StackFolio's JS and CSS: formatting, var → const/let, and small tidy-ups. Two PHPStan type fixes (casts to string, no strlen callback).

#20 Community files

  • CONTRIBUTING.md (adapted to StackFolio's layout and checks), SECURITY.md, bug and feature issue forms, and a PR template.

#21 Playground demo

  • .wordpress-org/blueprints/blueprint.json: installs the latest release with six sample albums (photos, a YouTube and a Vimeo video) and a demo page using the block.
  • "Try it in your browser" link in the README, plus a "How changes ship" section.

#22 Bundled lightGallery, Isotope and Vimeo player files are missing from the repo

  • Commits assets/vendor/. The old .gitignore rule vendor/ had hidden these files, so main had no lightbox or filter libraries. The standard .gitignore only ignores the root /vendor/.

Verification

  • bash -n on every .github/scripts/*.sh and bin/setup-github.sh (actionlint is not installed locally).
  • php -l on all PHP files.
  • Locally: composer lint, composer test (18 tests), PHPCS and PHPStan (no errors), and ESLint and Stylelint via wp-scripts (clean, run on Node 22.20).
  • Package preview: main file, blocks/, includes/, assets/ including assets/vendor/, readme.txt, uninstall.php, LICENSE. No dev files, no symlinks.
  • Built an exact copy of the package and ran the demo blueprint against it on WordPress Playground. The demo page renders six albums, filters work, and the lightbox opens with no console errors. On the album edit screen, the media list remove, reorder and picker all work.

What happens on merge

  • The repo has no vX.Y.Z tags yet (only the old v1.0-alpha1.0 and v1.0-beta.1, which the release workflow ignores), so this merge publishes v1.0.0 ("Initial release") with stackfolio.zip.
  • Deploys stay off until DEPLOY_ENABLED=true.

Closes #13
Closes #14
Closes #15
Closes #16
Closes #17
Closes #18
Closes #19
Closes #20
Closes #21
Closes #22

Brings StackFolio up to the wpgenius plugin standard (from `wpgenius/wordpress-plugin-boilerplate` at `8e5e3a3`) and fixes the bundled libraries missing from the repo.

## Changes

### #13 Standard ignore files
- `.gitignore` and `.distignore` are the standard's, followed by StackFolio's own rules.
- `.distignore` keeps `blocks/` in the zip. The block is plain JavaScript with no build step, so `blocks/album-grid/` is runtime code, not source.

### #14 Automatic releases
- `release.yml` and `.github/scripts/` copied as-is. `readme.txt` already had `Stable tag: 1.0.0` and a Changelog section.

### #15 Deploy workflow (WordPress.org SVN, off by default)
- `deploy.yml` copied as-is. Repo variables: `DEPLOY_METHOD=wporg`, `DEPLOY_ENABLED=false`.

### #16 Linked issue check on PRs
- `linked-issue.yml` copied as-is. `REQUIRE_LINKED_ISSUE=true`.

### #17 Dependabot for GitHub Actions
- `.github/dependabot.yml` copied as-is.

### #18 GitHub setup script
- `bin/setup-github.sh` copied as-is and run once: squash-only merges, release labels, private vulnerability reporting, the `release-bot` deploy key and the "Protect main" ruleset (Linked issue and CI required).

### #19 Tooling: CI, coding standards, PHPStan and local Docker
- `ci.yml` adapted to StackFolio. Jobs: PHP 7.4–8.5 syntax and unit tests, PHPCS, PHPStan (level 5), JS/CSS lint, Plugin Check. No block-build, integration-test or rename jobs, since StackFolio has none of those.
- `composer.json`, `phpcs.xml.dist` (`stackfolio` text domain and prefixes, `assets/vendor/` excluded), `phpstan.neon.dist` with Elementor stubs, `phpunit.xml.dist`, and unit tests for video-link parsing and album ID parsing.
- `package.json` with lint scripts only.
- Local Docker: `docker-compose.yml`, `.docker/`, `.env.example`, `.nvmrc`.
- Lint fixes in StackFolio's JS and CSS: formatting, `var` → `const`/`let`, and small tidy-ups. Two PHPStan type fixes (casts to string, no `strlen` callback).

### #20 Community files
- `CONTRIBUTING.md` (adapted to StackFolio's layout and checks), `SECURITY.md`, bug and feature issue forms, and a PR template.

### #21 Playground demo
- `.wordpress-org/blueprints/blueprint.json`: installs the latest release with six sample albums (photos, a YouTube and a Vimeo video) and a demo page using the block.
- "Try it in your browser" link in the README, plus a "How changes ship" section.

### #22 Bundled lightGallery, Isotope and Vimeo player files are missing from the repo
- Commits `assets/vendor/`. The old `.gitignore` rule `vendor/` had hidden these files, so `main` had no lightbox or filter libraries. The standard `.gitignore` only ignores the root `/vendor/`.

## Verification
- `bash -n` on every `.github/scripts/*.sh` and `bin/setup-github.sh` (actionlint is not installed locally).
- `php -l` on all PHP files.
- Locally: `composer lint`, `composer test` (18 tests), PHPCS and PHPStan (no errors), and ESLint and Stylelint via `wp-scripts` (clean, run on Node 22.20).
- Package preview: main file, `blocks/`, `includes/`, `assets/` including `assets/vendor/`, `readme.txt`, `uninstall.php`, `LICENSE`. No dev files, no symlinks.
- Built an exact copy of the package and ran the demo blueprint against it on WordPress Playground. The demo page renders six albums, filters work, and the lightbox opens with no console errors. On the album edit screen, the media list remove, reorder and picker all work.

## What happens on merge
- The repo has no `vX.Y.Z` tags yet (only the old `v1.0-alpha1.0` and `v1.0-beta.1`, which the release workflow ignores), so this merge publishes **v1.0.0** ("Initial release") with `stackfolio.zip`.
- Deploys stay off until `DEPLOY_ENABLED=true`.

Closes #13
Closes #14
Closes #15
Closes #16
Closes #17
Closes #18
Closes #19
Closes #20
Closes #21
Closes #22
@MakarandMane
MakarandMane merged commit a84f205 into main Nov 15, 2026
13 checks passed
@MakarandMane
MakarandMane deleted the repo-standard branch November 15, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant