Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
16ccd7a
docs: link canonical brand guidelines from footer
vitormattos Sep 24, 2026
4ecc7fc
docs: point brand link to LibreSign brand page
vitormattos Sep 24, 2026
bdf47c7
docs: add LibreSign brand and pronunciation page
vitormattos Sep 24, 2026
a670ac4
docs: use official LibreCode Coop spelling
vitormattos Sep 24, 2026
5fce487
docs: focus LibreSign brand page on product identity and freedom
vitormattos Sep 24, 2026
3b86d23
docs: reference canonical brand repository
vitormattos Sep 24, 2026
685089a
docs: align public brand page with reconciled brand system
vitormattos Sep 24, 2026
8fbea31
docs: remove migration language from public brand guide
vitormattos Sep 24, 2026
b9f257c
docs: link stable latest brand manual PDF
vitormattos Sep 24, 2026
54bc67f
docs: use stable latest brand manual URL
vitormattos Sep 24, 2026
d9edf0f
docs: align brand page with canonical brand system
vitormattos Sep 25, 2026
75bd3aa
refactor: give the brand page a clearer visual hierarchy
vitormattos Sep 25, 2026
5762381
style: load brand page styles
vitormattos Sep 25, 2026
b31d019
style: add dedicated brand page layout
vitormattos Sep 25, 2026
d185bef
fix: correct brand preview and add accessible pronunciation control
vitormattos Sep 25, 2026
0a57eba
feat: add progressive pronunciation playback
vitormattos Sep 25, 2026
32c14fc
build: load brand pronunciation behavior
vitormattos Sep 25, 2026
d460db0
style: refine accessible pronunciation control
vitormattos Sep 25, 2026
188e899
refactor: make pronunciation playback testable
vitormattos Sep 25, 2026
f5cc4cb
refactor: initialize tested pronunciation module
vitormattos Sep 25, 2026
c5006b3
refactor: replace pronunciation script with module
vitormattos Sep 25, 2026
49ed7bd
test: cover brand pronunciation playback
vitormattos Sep 25, 2026
2d506e8
test: add JavaScript test command
vitormattos Sep 25, 2026
20987b0
ci: run JavaScript unit tests
vitormattos Sep 25, 2026
5cb6c37
style: remove artificial uppercase brand labels
vitormattos Sep 25, 2026
109148d
ci: wait for preview pages deployment
vitormattos Sep 25, 2026
c259dda
ci: wait for preview pages deployment
vitormattos Sep 25, 2026
cd9d6b3
a11y: improve pronunciation text for screen readers
vitormattos Sep 25, 2026
ded324a
ci: verify preview is published before releasing deploy lock
vitormattos Sep 25, 2026
3ae89d9
ci: verify preview is published before releasing deploy lock
vitormattos Sep 25, 2026
c29e6b8
ci: skip stale preview revisions
vitormattos Sep 25, 2026
b054118
ci: cancel superseded preview runs
vitormattos Sep 25, 2026
30cf5ea
ci: use standard preview concurrency cancellation
vitormattos Sep 25, 2026
ec78de7
ci: refresh latest PR preview
vitormattos Sep 25, 2026
2baf7a4
ci: move preview deploys off stale concurrency queue
vitormattos Sep 25, 2026
4e082f7
ci: move preview deploys off stale concurrency queue
vitormattos Sep 25, 2026
69ae91b
feat: use recorded LibreSign pronunciation
vitormattos Sep 25, 2026
9f74ba4
ci: remove previews when pull requests close
vitormattos Sep 25, 2026
41841ea
ci: simplify preview workflows and name Node tests
vitormattos Sep 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node tests

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Run Node tests
run: npm run test:js
64 changes: 8 additions & 56 deletions .github/workflows/preview-fork-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,79 +10,31 @@ permissions:
contents: read
pull-requests: write

concurrency:
group: site-preview-deploy
cancel-in-progress: false
queue: max

jobs:
deploy-fork-preview:
deploy:
if: >
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request'
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.pull_requests[0].head.repo.id != github.event.workflow_run.repository.id
runs-on: ubuntu-latest
steps:
- name: Extract PR number from workflow_run payload
id: pr
run: |
pr_number=$(jq -r '.workflow_run.pull_requests[0].number // empty' "$GITHUB_EVENT_PATH")
echo "number=$pr_number" >> "$GITHUB_OUTPUT"

- name: Evaluate fork and freshness
id: pr_meta
if: steps.pr.outputs.number != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pr_json=$(curl -sS \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ steps.pr.outputs.number }}")

pr_head_sha=$(echo "$pr_json" | jq -r '.head.sha // ""')
pr_head_repo=$(echo "$pr_json" | jq -r '.head.repo.full_name // ""')

is_fork=false
if [ "$pr_head_repo" != "${{ github.repository }}" ]; then
is_fork=true
fi

is_latest=false
if [ "$pr_head_sha" = "${{ github.event.workflow_run.head_sha }}" ]; then
is_latest=true
fi

should_deploy=false
if [ "$is_fork" = "true" ] && [ "$is_latest" = "true" ]; then
should_deploy=true
fi

echo "is_fork=$is_fork" >> "$GITHUB_OUTPUT"
echo "is_latest=$is_latest" >> "$GITHUB_OUTPUT"
echo "should_deploy=$should_deploy" >> "$GITHUB_OUTPUT"

- name: Download fork build artifact
if: steps.pr.outputs.number != '' && steps.pr_meta.outputs.should_deploy == 'true'
steps:
- name: Download preview artifact
uses: actions/download-artifact@v4
with:
name: preview-build-fork
path: build_production/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy fork preview
if: steps.pr.outputs.number != '' && steps.pr_meta.outputs.should_deploy == 'true'
# Temporary LibreSign fork: forwards explicit `pr-number` to the native
# sticky PR comment in `workflow_run`; replace with upstream after merge/release.
- name: Deploy preview
uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978
with:
action: deploy
source-dir: ./build_production/
pr-number: ${{ steps.pr.outputs.number }}
pr-number: ${{ github.event.workflow_run.pull_requests[0].number }}
pages-base-url: libresign.github.io/site-preview
deploy-repository: LibreSign/site-preview
preview-branch: main
wait-for-pages-deployment: false
wait-for-pages-deployment: true
token: ${{ secrets.PREVIEW_TOKEN }}

38 changes: 8 additions & 30 deletions .github/workflows/preview-remove.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,25 @@
name: PR Preview Manual Remove
name: PR Preview Remove

on:
workflow_dispatch:
inputs:
pr_number:
description: "Pull request number to remove preview for"
required: true
type: string
pull_request_target:
branches: [main]
types: [closed]

permissions:
contents: read

concurrency:
group: site-preview-deploy
cancel-in-progress: false
queue: max

jobs:
remove-preview:
remove:
runs-on: ubuntu-latest
steps:
- name: Validate PR number input
id: validate
env:
INPUT_PR_NUMBER: ${{ inputs.pr_number }}
run: |
if ! [[ "$INPUT_PR_NUMBER" =~ ^[1-9][0-9]*$ ]]; then
echo "Invalid pr_number: must be a positive integer." >&2
exit 1
fi

echo "pr_number=$INPUT_PR_NUMBER" >> "$GITHUB_OUTPUT"

- name: Remove preview snapshot
# Keep this pinned to the same reviewed fork commit used by other
# privileged preview paths for consistent behavior.
steps:
- name: Remove preview
uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978
with:
action: remove
pr-number: ${{ steps.validate.outputs.pr_number }}
pr-number: ${{ github.event.pull_request.number }}
deploy-repository: LibreSign/site-preview
preview-branch: main
pages-base-url: libresign.github.io/site-preview
wait-for-pages-deployment: false
comment: false
token: ${{ secrets.PREVIEW_TOKEN }}
22 changes: 9 additions & 13 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ name: PR Preview

on:
pull_request:
branches: [ main ]
branches: [main]
types: [opened, reopened, synchronize]

concurrency:
group: pr-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

concurrency:
group: site-preview-deploy
cancel-in-progress: false
queue: max

jobs:
preview:
runs-on: ubuntu-latest

steps:
# Deliberately no `closed` handling: previews are kept as historical snapshots.
- uses: actions/checkout@v4

- name: Set up Node.js
Expand All @@ -34,12 +33,11 @@ jobs:
- name: Install PHP dependencies
run: composer install

- name: Adjust preview base URLs and config
- name: Adjust preview URLs
run: |
sed -i "s|libresign.coop|libresign.github.io|g" CNAME
sed -i "s|baseUrl' => '/'|baseUrl' => 'https://LibreSign.github.io/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}/'|g" config.php
sed -i "s|base: '/assets/build/'|base: 'https://libresign.github.io/site-preview/pr-preview/pr-${{ github.event.pull_request.number }}/assets/build/'|g" vite.config.js
cat config.php|grep "'baseUrl' => "
sed -i "/'matomo_container'/d" config.production.php

- name: Build production site
Expand All @@ -56,10 +54,8 @@ jobs:
path: build_production/
retention-days: 1

- name: Deploy internal preview
- name: Deploy preview
if: github.event.pull_request.head.repo.full_name == github.repository
# Temporary LibreSign fork with the pr-number forwarding fix.
# Replace with upstream once the fix is merged and released.
uses: LibreSign/pr-preview-action@2a6da1177b47dc23173ba9a75e01da0a0d800978
with:
action: deploy
Expand All @@ -68,5 +64,5 @@ jobs:
pages-base-url: libresign.github.io/site-preview
deploy-repository: LibreSign/site-preview
preview-branch: main
wait-for-pages-deployment: false
wait-for-pages-deployment: true
token: ${{ secrets.PREVIEW_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"watch": "NODE_ENV=development vite build --watch",
"build-assets": "NODE_ENV=local vite build",
"staging": "NODE_ENV=staging vite build",
"prod": "NODE_ENV=production vite build"
"prod": "NODE_ENV=production vite build",
"test:js": "node --test tests/js/*.test.mjs"
},
"devDependencies": {
"@tighten/jigsaw-vite-plugin": "^2.0.0",
Expand Down
47 changes: 47 additions & 0 deletions source/_assets/js/brand-pronunciation.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export function createPronunciationController({ button, status, audio }) {
const reset = () => {
button.disabled = false;
button.removeAttribute('aria-busy');
};

const play = async () => {
audio.currentTime = 0;
button.disabled = true;
button.setAttribute('aria-busy', 'true');
status.textContent = 'Playing LibreSign pronunciation.';

try {
await audio.play();
} catch {
status.textContent = 'Pronunciation playback is not available on this device.';
reset();
}
};

audio.addEventListener('ended', () => {
status.textContent = 'Pronunciation playback finished.';
reset();
});

audio.addEventListener('error', () => {
status.textContent = 'Pronunciation playback is not available on this device.';
reset();
});

button.addEventListener('click', play);

return { play };
}

export function initBrandPronunciation({ documentRef = document } = {}) {
const button = documentRef.querySelector('[data-brand-pronunciation]');
const status = documentRef.querySelector('[data-brand-pronunciation-status]');
const audio = documentRef.querySelector('[data-brand-pronunciation-audio]');

if (!button || !status || !audio || typeof audio.play !== 'function') {
return false;
}

createPronunciationController({ button, status, audio });
return true;
}
3 changes: 3 additions & 0 deletions source/_assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { initBrandPronunciation } from './brand-pronunciation.mjs';
import 'bootstrap/dist/js/bootstrap.bundle.min.js';
import 'animate.css';

initBrandPronunciation();

import AOS from 'aos';
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
AOS.init({
Expand Down
Loading
Loading