Skip to content

Commit 2407c26

Browse files
committed
Merge branch 'master' of https://github.com/justin212407/musicblocks into deployment-pipeline-added
2 parents 33881c3 + 5bcd964 commit 2407c26

File tree

231 files changed

+329597
-303618
lines changed

Some content is hidden

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

231 files changed

+329597
-303618
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/ISSUE_TEMPLATE/DMP_2024.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ description: List a new project for Dedicated Mentoring Program (DMP) 2024
33
title: "[DMP 2024]: "
44
labels: ["DMP 2024"]
55
body:
6-
- type: textarea
6+
- type: textarea
77
id: ticket-description
88
validations:
99
required: true
1010
attributes:
1111
label: Ticket Contents
12-
value: |
13-
## Description
14-
[Provide a brief description of the feature, including why it is needed and what it will accomplish.]
12+
description: "Provide a brief description of the feature, including why it is needed and what it will accomplish. E.g., 'This feature aims to create an interactive UI for students to collaborate on assignments in real-time.'"
13+
1514

1615
- type: textarea
1716
id: ticket-goals
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Run Jest Tests on PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
test:
11+
name: Run Jest Tests
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
contents: read
16+
issues: write
17+
18+
steps:
19+
- name: Checkout Repository
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.pull_request.head.sha }}
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
29+
- name: Install Dependencies
30+
run: npm install
31+
32+
- name: Run Jest Tests
33+
id: jest
34+
run: |
35+
npm test -- --json --outputFile=jest-results.json || echo "TESTS_FAILED=true" >> $GITHUB_ENV
36+
37+
- name: Read Jest Results
38+
id: results
39+
run: |
40+
# Default TESTS_FAILED to false
41+
if [ -z "$TESTS_FAILED" ]; then
42+
TESTS_FAILED=false
43+
fi
44+
45+
# Set TESTS_PASSED properly
46+
if [ "$TESTS_FAILED" = "true" ]; then
47+
TESTS_PASSED=false
48+
echo "TESTS_PASSED=false" >> $GITHUB_ENV
49+
FAILED_TESTS=$(jq -r '[.testResults[] | select(.status == "failed") | .name] | map(split("/") | last) | join("\n")' jest-results.json)
50+
echo "FAILED_TESTS<<EOF" >> $GITHUB_ENV
51+
echo "$FAILED_TESTS" >> $GITHUB_ENV
52+
echo "EOF" >> $GITHUB_ENV
53+
else
54+
TESTS_PASSED=true
55+
echo "TESTS_PASSED=true" >> $GITHUB_ENV
56+
echo "FAILED_TESTS=None" >> $GITHUB_ENV
57+
fi
58+
59+
# Extract PR number
60+
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
61+
62+
# Generate a temporary file for the comment
63+
COMMENT_FILE=$(mktemp)
64+
65+
# Save variables to GITHUB_OUTPUT
66+
echo "TESTS_PASSED=$TESTS_PASSED" >> $GITHUB_ENV
67+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
68+
echo "COMMENT_FILE=$COMMENT_FILE" >> $GITHUB_OUTPUT
69+
70+
# Generate content for the comment file
71+
{
72+
if [ "$TESTS_PASSED" = "true" ]; then
73+
echo "✅ All Jest tests passed! This PR is ready to merge."
74+
else
75+
echo "❌ Some Jest tests failed. Please check the logs and fix the issues before merging."
76+
echo ""
77+
echo "**Failed Tests:**"
78+
echo ""
79+
echo '```'
80+
echo "$FAILED_TESTS"
81+
echo '```'
82+
fi
83+
} > "$COMMENT_FILE"
84+
85+
- name: PR comment
86+
uses: thollander/actions-comment-pull-request@v3
87+
with:
88+
file-path: ${{ steps.results.outputs.COMMENT_FILE }}
89+
pr-number: ${{ steps.results.outputs.PR_NUMBER }}
90+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/weblate-sync.yaml

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

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,21 @@ following resources:
259259
Programmers, please follow these general [guidelines for
260260
contributions](https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md).
261261
262+
### Translators
263+
264+
Music Blocks uses
265+
[PO files](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
266+
to maintain translations of the text strings used in the
267+
interface. The PO files are available through an
268+
[interactive website](https://weblate.sugarlabs.org/projects/music-blocks/music-blocks/).
269+
270+
Alternatively, translators can clone the
271+
[git repo](https://github.com/sugarlabs/musicblocks.git), edit the PO files
272+
locally, and make a pull request.
273+
274+
Note that once the PO files are updated, they are compiled into an INI
275+
file, which is the file used by Music Blocks.
276+
262277
### New Contributors
263278
264279
Use the
51.9 KB
Loading

css/activities.css

Lines changed: 155 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,26 @@
1212
}
1313
*/
1414

15+
@import url("play-only-mode.css");
16+
1517
*:focus {
1618
outline: none;
1719
}
1820

21+
body:not(.dark) #helpfulSearch,
22+
body:not(.dark) .ui-autocomplete {
23+
background-color: #fff !important;
24+
color: #000 !important;
25+
}
26+
27+
body:not(.dark) .ui-autocomplete li:hover {
28+
background-color: #ddd !important;
29+
}
30+
31+
body:not(.dark) #helpfulSearchDiv {
32+
background-color: #f9f9f9 !important;
33+
}
34+
1935
.modal {
2036
display: none;
2137
position: fixed;
@@ -29,11 +45,27 @@
2945
}
3046

3147
.modal-content {
48+
position: fixed;
49+
top: 50%;
50+
left: 50%;
51+
transform: translate(-50%, -50%);
52+
width: 400px;
53+
padding: 24px;
3254
background-color: #fefefe;
33-
margin: 15% auto;
34-
padding: 20px;
35-
border: 1px solid #888;
36-
width: 50%;
55+
box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 8px;
56+
border-radius: 8px;
57+
z-index: 10000;
58+
text-align: left;
59+
}
60+
61+
#submitLilypond {
62+
background-color: rgb(0, 102, 255);
63+
border: none;
64+
border-radius: 4px;
65+
padding: 8px 16px;
66+
font-weight: bold;
67+
cursor: pointer;
68+
margin-right: 16px;
3769
}
3870

3971
.close {
@@ -76,7 +108,7 @@
76108
display: block !important;
77109
position: absolute;
78110
background-color: #f0f0f0;
79-
padding: 5px;
111+
padding: 2px;
80112
border: 1px solid #ccc;
81113
width: 230px;
82114
z-index: 1;
@@ -90,6 +122,83 @@
90122
font-size: large;
91123
}
92124

125+
#crossButton {
126+
position: absolute;
127+
top: 50%;
128+
right: -30px;
129+
transform: translateY(-50%);
130+
background: transparent;
131+
border: none;
132+
font-size: large;
133+
cursor: pointer;
134+
}
135+
136+
.trash-view {
137+
position: relative;
138+
background-color: white;
139+
max-width: 396px;
140+
max-height: 200px;
141+
overflow-y: auto;
142+
font-size: 16px;
143+
color: black;
144+
border: 2px solid #87cefa;
145+
list-style-type: none;
146+
margin: 0;
147+
padding: 0;
148+
text-align: left;
149+
}
150+
151+
.button-container {
152+
position: sticky;
153+
display: flex;
154+
justify-content: space-between;
155+
top: 0;
156+
z-index: 10;
157+
display: flex;
158+
gap: 10px;
159+
background: #2196F3;
160+
margin: 0;
161+
padding: 5px;
162+
border-bottom: 1px solid #d9d9d9;
163+
}
164+
165+
.trash-item {
166+
padding: 2px 12px;
167+
margin: 1px 0;
168+
border-radius: 4px;
169+
transition: background-color 0.3s;
170+
}
171+
172+
.trash-item.hover {
173+
background-color: #d9d9d9;
174+
}
175+
176+
.trash-item-icon {
177+
width: 30px;
178+
height: 30px;
179+
margin-right: 10px;
180+
vertical-align: middle;
181+
}
182+
183+
#restoreLastIcon, #restoreAllIcon {
184+
display: flex;
185+
align-items: center;
186+
justify-content: center;
187+
width: 48px;
188+
height: 48px;
189+
cursor: pointer;
190+
}
191+
192+
193+
.material-icons.md-48 {
194+
font-size: 32px;
195+
}
196+
197+
198+
.hidden {
199+
display: none;
200+
}
201+
93202
.ui-menu {
94203
position: relative;
95204
background-color: rgba(255, 255, 255, 1);
@@ -421,7 +530,7 @@ img.icon:hover {
421530
}
422531

423532
#loading-image-container {
424-
z-index: 99999;
533+
z-index: 89999;
425534
}
426535

427536
body {
@@ -527,6 +636,8 @@ table {
527636

528637
#canvas {
529638
overflow-y: visible;
639+
background-color: #FFFFFF;
640+
width: 100%;
530641
}
531642

532643
#statusDiv {
@@ -982,6 +1093,7 @@ table {
9821093
#helpBodyDiv .message {
9831094
text-align: center;
9841095
line-height: 1.2;
1096+
margin: auto;
9851097
}
9861098

9871099
#helpBodyDiv .icon-container {
@@ -1769,3 +1881,40 @@ table {
17691881
clear: both;
17701882
}
17711883
}
1884+
.logo-container{
1885+
position: absolute;
1886+
bottom: 1px; /* Distance from the bottom */
1887+
right: 23px; /* Distance from the right */
1888+
padding: 0px;
1889+
border-radius: 5px;
1890+
cursor: pointer;
1891+
}
1892+
#link-to-sugarLabs:link ,
1893+
#link-to-sugarLabs:visited ,
1894+
#link-to-sugarLabs:hover ,
1895+
#link-to-sugarLabs:active {
1896+
color: #000;
1897+
}
1898+
.color-change {
1899+
fill : #033CD2;
1900+
stroke : #78E600;
1901+
stroke-width: 3;
1902+
}
1903+
1904+
#persistentNotification {
1905+
position: fixed;
1906+
bottom: 20px;
1907+
left: 50%;
1908+
transform: translateX(-50%);
1909+
background-color: #1E88E5;
1910+
color: white;
1911+
padding: 15px 20px;
1912+
border-radius: 8px;
1913+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
1914+
font-size: 14px;
1915+
font-weight: bold;
1916+
z-index: 1000;
1917+
text-align: center;
1918+
min-width: 250px;
1919+
max-width: 80%;
1920+
}

css/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)