Skip to content

Commit aeaace9

Browse files
Merge branch 'master' into fix/lang-undefined-loader-5197
2 parents 4cf37d2 + 5a34c5b commit aeaace9

File tree

216 files changed

+27249
-38457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+27249
-38457
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
*.md text eol=lf
77
*.yml text eol=lf
88
*.yaml text eol=lf
9+
# Mark locale files as generated - hides them from PR diffs by default
10+
# These files are auto-generated from PO files via convert_po_to_json.py
11+
locales/*.json linguist-generated=true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 🐛 Bug Report
33
about: Report an issue to help us improve
4-
title: ""
4+
title: "[Bug]"
55
labels: "Issue-Bug"
66
assignees: ""
77
---

.github/ISSUE_TEMPLATE/chore_task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 🧹Chore or task
33
about: Identify a necessary task to be addressed.
4-
title: ""
4+
title: "[Chore]"
55
labels: ""
66
assignees: ""
77
---

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 💡 Feature request
33
about: Suggest an enhancement
4-
title: ""
4+
title: "[Feature]"
55
labels: "Issue-Enhancement"
66
assignees: ""
77
---
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: 🚀 Performance & Accessibility
3+
about: Suggest improvements for performance or accessibility
4+
title: "[Performance]"
5+
labels: "Issue-Performance"
6+
assignees: ""
7+
---
8+
9+
### Description
10+
11+
<!-- A brief description of the performance or accessibility issue. -->
12+
13+
### Current Behavior
14+
15+
<!-- Describe the current performance metrics or accessibility barrier. Include Lighthouse results, screen reader observations, or other relevant audit details if available. -->
16+
17+
### Expected Behavior
18+
19+
<!-- Describe the expected performance or accessible behavior. -->
20+
21+
### Audits / Screenshots
22+
23+
<!-- Add any relevant audit screenshots or recordings that help explain the issue. -->
24+
25+
### Proposed Solution (Optional)
26+
27+
<!-- Describe your proposed solution or approach to fix the issue. -->
28+
29+
### Environment
30+
31+
- Device type: [e.g., desktop, mobile]
32+
- Operating System: [e.g., Windows, macOS, Linux, Android, iOS]
33+
- Browser (if applicable): [e.g., Chrome, Firefox, Safari]
34+
- Version of Software/Project: [e.g., v1.0.0]
35+
36+
### Checklist
37+
38+
- [ ] I have read and followed the project's code of conduct.
39+
- [ ] I have searched for similar issues before creating this one.
40+
- [ ] I have provided enough information to understand and assess the issue.
41+
- [ ] I am willing to contribute to the resolution of this issue.
42+
43+
---
44+
45+
Thank you for contributing to our project! We appreciate your help in improving it.
46+
47+
📚 See [contributing instructions](https://github.com/sugarlabs/musicblocks/blob/master/README.md).
48+
49+
🙋🏾🙋🏼 Questions: [Community Matrix Server](https://matrix.to/#/#sugar:matrix.org).

.github/ISSUE_TEMPLATE/test_contribution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 🧪 Test Contribution
33
about: Add or improve unit tests
4-
title: ""
4+
title: "[Test]"
55
labels: "testing"
66
assignees: ""
77
---
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: 🎨 UI/UX
3+
about: Report UI or UX bugs, inconsistencies, or improvement suggestions
4+
title: "[UI/UX]"
5+
labels: "Issue-User-Experience"
6+
assignees: ""
7+
---
8+
9+
### Description
10+
11+
<!-- Briefly describe the UI/UX issue or improvement idea. -->
12+
13+
### Current Behavior
14+
15+
<!-- Describe the current user interface or user experience behavior. -->
16+
17+
### Expected Behavior
18+
19+
<!-- Describe the intended or preferred behavior of the interface. -->
20+
21+
### Screenshots
22+
23+
<!-- Add screenshots, mockups, or references if available. -->
24+
25+
### Proposed Approach (Optional)
26+
27+
<!-- If you have ideas or suggestions, share them here. -->
28+
29+
### Environment
30+
31+
- Operating System: [e.g., Windows, macOS, Linux]
32+
- Browser (if applicable): [e.g., Chrome, Firefox, Safari]
33+
- Version of Software/Project: [e.g., v1.0.0]
34+
35+
### Checklist
36+
37+
- [ ] I have read and followed the project's code of conduct.
38+
- [ ] I have searched for similar issues before creating this one.
39+
- [ ] I have provided enough information to understand the issue.
40+
- [ ] I am willing to contribute to the resolution of this issue.
41+
42+
---
43+
44+
Thank you for contributing to our project! We appreciate your help in improving it.
45+
46+
📚 See [contributing instructions](https://github.com/sugarlabs/musicblocks/blob/master/README.md).
47+
48+
🙋🏾🙋🏼 Questions: [Community Matrix Server](https://matrix.to/#/#sugar:matrix.org).
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Lighthouse CI
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [master]
8+
9+
jobs:
10+
lighthouse:
11+
name: Lighthouse Performance Audit
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
contents: read
16+
issues: write
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Install Lighthouse CI
35+
run: npm install -g @lhci/cli@0.14.x
36+
37+
- name: Run Lighthouse CI
38+
id: lighthouse
39+
run: |
40+
lhci autorun --config=./lighthouserc.js 2>&1 | tee lighthouse-output.txt
41+
echo "LIGHTHOUSE_EXIT_CODE=$?" >> $GITHUB_ENV
42+
43+
- name: Parse Lighthouse Results
44+
id: parse
45+
run: |
46+
# Extract scores from the lighthouse output
47+
# Create a results summary
48+
mkdir -p lighthouse-results
49+
50+
# Find the latest report
51+
REPORT_DIR=".lighthouseci"
52+
if [ -d "$REPORT_DIR" ]; then
53+
# Get the manifest file
54+
MANIFEST="$REPORT_DIR/manifest.json"
55+
if [ -f "$MANIFEST" ]; then
56+
# Extract average scores from manifest
57+
PERF_SCORE=$(jq '[.[].summary.performance] | add / length * 100 | floor' "$MANIFEST" 2>/dev/null || echo "N/A")
58+
A11Y_SCORE=$(jq '[.[].summary.accessibility] | add / length * 100 | floor' "$MANIFEST" 2>/dev/null || echo "N/A")
59+
BP_SCORE=$(jq '[.[].summary["best-practices"]] | add / length * 100 | floor' "$MANIFEST" 2>/dev/null || echo "N/A")
60+
SEO_SCORE=$(jq '[.[].summary.seo] | add / length * 100 | floor' "$MANIFEST" 2>/dev/null || echo "N/A")
61+
62+
# Get report URL from temporary-public-storage
63+
REPORT_URL=$(jq -r '.[0].url // "N/A"' "$MANIFEST" 2>/dev/null)
64+
65+
echo "PERF_SCORE=$PERF_SCORE" >> $GITHUB_OUTPUT
66+
echo "A11Y_SCORE=$A11Y_SCORE" >> $GITHUB_OUTPUT
67+
echo "BP_SCORE=$BP_SCORE" >> $GITHUB_OUTPUT
68+
echo "SEO_SCORE=$SEO_SCORE" >> $GITHUB_OUTPUT
69+
echo "REPORT_URL=$REPORT_URL" >> $GITHUB_OUTPUT
70+
fi
71+
fi
72+
73+
- name: Get Score Emoji
74+
id: emoji
75+
run: |
76+
get_emoji() {
77+
score=$1
78+
if [ "$score" = "N/A" ]; then
79+
echo "⚪"
80+
elif [ "$score" -ge 90 ]; then
81+
echo "🟢"
82+
elif [ "$score" -ge 50 ]; then
83+
echo "🟠"
84+
else
85+
echo "🔴"
86+
fi
87+
}
88+
89+
echo "PERF_EMOJI=$(get_emoji '${{ steps.parse.outputs.PERF_SCORE }}')" >> $GITHUB_OUTPUT
90+
echo "A11Y_EMOJI=$(get_emoji '${{ steps.parse.outputs.A11Y_SCORE }}')" >> $GITHUB_OUTPUT
91+
echo "BP_EMOJI=$(get_emoji '${{ steps.parse.outputs.BP_SCORE }}')" >> $GITHUB_OUTPUT
92+
echo "SEO_EMOJI=$(get_emoji '${{ steps.parse.outputs.SEO_SCORE }}')" >> $GITHUB_OUTPUT
93+
94+
- name: Comment on PR
95+
if: github.event_name == 'pull_request'
96+
uses: thollander/actions-comment-pull-request@v3
97+
with:
98+
message: |
99+
## 🔦 Lighthouse Performance Report
100+
101+
| Category | Score | Status |
102+
|----------|-------|--------|
103+
| ⚡ Performance | **${{ steps.parse.outputs.PERF_SCORE }}** | ${{ steps.emoji.outputs.PERF_EMOJI }} |
104+
| ♿ Accessibility | **${{ steps.parse.outputs.A11Y_SCORE }}** | ${{ steps.emoji.outputs.A11Y_EMOJI }} |
105+
| ✅ Best Practices | **${{ steps.parse.outputs.BP_SCORE }}** | ${{ steps.emoji.outputs.BP_EMOJI }} |
106+
| 🔍 SEO | **${{ steps.parse.outputs.SEO_SCORE }}** | ${{ steps.emoji.outputs.SEO_EMOJI }} |
107+
108+
### Score Legend
109+
- 🟢 90-100: Excellent
110+
- 🟠 50-89: Needs Improvement
111+
- 🔴 0-49: Poor
112+
113+
> 📊 [View Full Lighthouse Report](${{ steps.parse.outputs.REPORT_URL }})
114+
115+
---
116+
*This performance audit helps ensure PRs don't negatively impact user experience.*
117+
comment-tag: lighthouse-report
118+
mode: recreate
119+
pr-number: ${{ github.event.pull_request.number }}
120+
121+
- name: Upload Lighthouse Reports
122+
uses: actions/upload-artifact@v4
123+
if: always()
124+
with:
125+
name: lighthouse-reports
126+
path: .lighthouseci/
127+
retention-days: 30

0 commit comments

Comments
 (0)