From 8b62bf10ffbb6561985018c5a669a7498cff86cb Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:45:22 -0500 Subject: [PATCH 1/3] Fix search module dropping to new row in header (#117) Remove width: 100% from .container-search that forced it to wrap. Change desktop media query from flex: 1 1 100% to flex: 1 1 auto with min-width: 200px so the search grows to fill remaining space alongside the menu without forcing a new row. Closes #117 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/media/css/template.css | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/media/css/template.css b/src/media/css/template.css index 4e357e7..20adf82 100644 --- a/src/media/css/template.css +++ b/src/media/css/template.css @@ -14486,7 +14486,6 @@ li.current a { .container-header .container-search { margin-top: 0.75em; - width: 100%; } .container-header .container-search .mod-finder, @@ -18676,8 +18675,8 @@ nav[data-toggle=toc] .nav-link.active+ul{ } .container-header .container-search { - flex: 1 1 100%; - width: 100%; + flex: 1 1 auto; + min-width: 200px; margin-top: 0; } } From fe7acc54b37338cdcee9c165c6543cea4a9c2946 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:47:15 -0500 Subject: [PATCH 2/3] ci: Joomla release builds ZIP + SHA-256 checksum Add Step 6b that builds a release ZIP from src/ for waas-component (Joomla) platforms: - Zips all files in src/ with root-relative paths - Computes SHA-256 checksum - Derives element name from tag (not manifest filename) - Uploads ZIP as release asset in Step 7 Also fix EXT_ELEMENT derivation in Step 5 (update.xml) to use tag lowercased instead of manifest filename, so the element is "mokocassiopeia" not "templateDetails". Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/auto-release.yml | 86 ++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 5462926..bc1291c 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -266,9 +266,10 @@ jobs: TARGET_PLATFORM=$(grep -oP '' "$MANIFEST" 2>/dev/null | head -1 || echo "") PHP_MINIMUM=$(grep -oP '\K[^<]+' "$MANIFEST" 2>/dev/null | head -1 || echo "") - # Derive element from manifest filename if not in XML + # Derive element: for templates use lowercased, fallback to manifest filename if [ -z "$EXT_ELEMENT" ]; then - EXT_ELEMENT=$(basename "$MANIFEST" .xml) + EXT_ELEMENT=$(grep -oP '\K[^<]+' "$MANIFEST" 2>/dev/null | head -1 | tr '[:upper:]' '[:lower:]' | tr -d ' ' || true) + [ -z "$EXT_ELEMENT" ] && EXT_ELEMENT=$(basename "$MANIFEST" .xml) fi # Build client tag: plugins and frontend modules need site @@ -359,6 +360,66 @@ jobs: git push origin "$TAG" echo "🏷️ Tag: ${TAG}" >> $GITHUB_STEP_SUMMARY + # ── STEP 6b: Build release ZIP + SHA-256 (Joomla) ────────────────── + - name: "Step 6b: Build Joomla release ZIP" + if: >- + steps.version.outputs.skip != 'true' && + steps.check.outputs.already_released != 'true' + id: zip + run: | + PLATFORM=$(php /tmp/mokostandards/api/cli/platform_detect.php --path . 2>/dev/null || true) + VERSION="${{ steps.version.outputs.version }}" + + if [ "$PLATFORM" != "waas-component" ]; then + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + + # Resolve source directory + if [ -d "src" ]; then + SRC="src" + elif [ -d "htdocs" ]; then + SRC="htdocs" + else + echo "⚠️ No src/ or htdocs/ directory — skipping ZIP" >> "$GITHUB_STEP_SUMMARY" + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + + # Derive element name from template/extension name (lowercase, no spaces) + MANIFEST=$(find . -maxdepth 2 -name "*.xml" -exec grep -l '/dev/null | head -1 || true) + EXT_ELEMENT="" + if [ -n "$MANIFEST" ]; then + EXT_ELEMENT=$(grep -oP '\K[^<]+' "$MANIFEST" 2>/dev/null | head -1 || true) + if [ -z "$EXT_ELEMENT" ]; then + # For templates: use tag lowercased + EXT_ELEMENT=$(grep -oP '\K[^<]+' "$MANIFEST" 2>/dev/null | head -1 | tr '[:upper:]' '[:lower:]' | tr -d ' ' || true) + fi + fi + [ -z "$EXT_ELEMENT" ] && EXT_ELEMENT=$(basename "$(pwd)" | tr '[:upper:]' '[:lower:]') + + ZIP_NAME="${EXT_ELEMENT}-${VERSION}.zip" + ZIP_PATH="/tmp/${ZIP_NAME}" + + # Build ZIP from src/ contents (cd into src so paths are root-relative) + (cd "$SRC" && zip -r "$ZIP_PATH" .) + SHA256=$(sha256sum "$ZIP_PATH" | awk '{print $1}') + + echo "zip_path=${ZIP_PATH}" >> "$GITHUB_OUTPUT" + echo "zip_name=${ZIP_NAME}" >> "$GITHUB_OUTPUT" + echo "sha256=${SHA256}" >> "$GITHUB_OUTPUT" + echo "ext_element=${EXT_ELEMENT}" >> "$GITHUB_OUTPUT" + echo "skip=false" >> "$GITHUB_OUTPUT" + + { + echo "### 📦 Release ZIP" + echo "| Field | Value |" + echo "|-------|-------|" + echo "| File | \`${ZIP_NAME}\` |" + echo "| SHA-256 | \`${SHA256}\` |" + echo "| Source | \`${SRC}/\` |" + } >> "$GITHUB_STEP_SUMMARY" + # ── STEP 7: Create or update GitHub Release ────────────────────────── - name: "Step 7: GitHub Release" if: >- @@ -371,6 +432,8 @@ jobs: TAG="${{ steps.version.outputs.tag }}" BRANCH="${{ steps.version.outputs.branch }}" IS_MINOR="${{ steps.version.outputs.is_minor }}" + ZIP_PATH="${{ steps.zip.outputs.zip_path }}" + ZIP_SKIP="${{ steps.zip.outputs.skip }}" # Derive the minor version base (XX.YY.00) MINOR_BASE=$(echo "$VERSION" | sed 's/\.[0-9]*$/.00/') @@ -380,16 +443,22 @@ jobs: [ -z "$NOTES" ] && NOTES="Release ${VERSION}" echo "$NOTES" > /tmp/release_notes.md + # Build release command args — include ZIP if built + UPLOAD_ARGS="" + if [ "$ZIP_SKIP" != "true" ] && [ -f "$ZIP_PATH" ]; then + UPLOAD_ARGS="$ZIP_PATH" + fi + if [ "$IS_MINOR" = "true" ]; then # Minor release: create new GitHub Release gh release create "$TAG" \ --title "${VERSION}" \ --notes-file /tmp/release_notes.md \ - --target "$BRANCH" + --target "$BRANCH" \ + $UPLOAD_ARGS echo "🚀 Release created: ${VERSION}" >> $GITHUB_STEP_SUMMARY else # Patch release: update the existing minor release with new tag - # Find the latest release for this minor version EXISTING=$(gh release view "$MINOR_TAG" --json tagName -q .tagName 2>/dev/null || true) if [ -n "$EXISTING" ]; then # Update existing release body with patch info @@ -406,12 +475,19 @@ jobs: gh release edit "$MINOR_TAG" \ --title "${MINOR_BASE} (latest: ${VERSION})" \ --notes-file /tmp/updated_notes.md + + # Upload ZIP to existing release + if [ "$ZIP_SKIP" != "true" ] && [ -f "$ZIP_PATH" ]; then + gh release upload "$MINOR_TAG" "$ZIP_PATH" --clobber + fi + echo "📝 Release updated: ${MINOR_BASE} → patch ${VERSION}" >> $GITHUB_STEP_SUMMARY else # No existing minor release found — create one for this patch gh release create "$TAG" \ --title "${VERSION}" \ - --notes-file /tmp/release_notes.md + --notes-file /tmp/release_notes.md \ + $UPLOAD_ARGS echo "🚀 Release created: ${VERSION} (no minor release found)" >> $GITHUB_STEP_SUMMARY fi fi From 79e7922311acec5507d313779214c7c3ffca8d7e Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:49:54 -0500 Subject: [PATCH 3/3] chore(release): bump version to 03.09.02 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/templateDetails.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templateDetails.xml b/src/templateDetails.xml index bdd56fe..2e37862 100644 --- a/src/templateDetails.xml +++ b/src/templateDetails.xml @@ -36,7 +36,7 @@ MokoCassiopeia - 03.09.01 + 03.09.02 script.php 2026-03-26 Jonathan Miller || Moko Consulting