Skip to content

Commit 7f40667

Browse files
committed
New UI framework classes and score lib features.
- Unfolded a number of nested useEffect calls in hooks to be used in class components. So much simpler now. - Added HOCs for classes that have to subscribe to elements that have to be accessed via preact contexts (props forwarding). - Replaced all simple HTML buttons with our Button class. - Added new dialog types to allow input from the user beyond the standard browser abilities. - Added UpDown control to the UI framework for numeric changes. Removed the no longer needed NumberInput class. - Data type simplifications (removed unnecessary interfaces, used Readonly<> to make types unmodifiable instead of defining an own type for that feature). - Added action buttons in the score tree to interact with an entry (add, remove, rename, import). - Yes, we can now import existing BananaDrum song links in our db. - Data model: - Added folder name validation. - Scores can now be added to db. - Entries can be renamed + deleted. - Fixed many bugs related to subscriptions and score replay.
1 parent 7539b13 commit 7f40667

Some content is hidden

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

66 files changed

+2516
-993
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"cSpell.words": [
3+
"abelian",
34
"Agogo",
45
"animada",
56
"bateria",
@@ -19,6 +20,7 @@
1920
"Repinique",
2021
"repiniques",
2122
"Rimshot",
23+
"Scorebook",
2224
"serialisation",
2325
"serialise",
2426
"Serialised",
@@ -32,6 +34,7 @@
3234
],
3335
"cSpell.ignoreWords": [
3436
"folderid",
35-
"parentid"
37+
"parentid",
38+
"tableholder"
3639
]
3740
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"dev": "vite",
1414
"build": "vite build",
1515
"test": "vitest --no-watch",
16-
"lint": "eslint 'src/**/*.{ts,tsx}'"
16+
"lint": "eslint 'src/**/*.{ts,tsx}'",
17+
"watch": "tsc --noEmit --watch"
1718
},
1819
"dependencies": {
1920
"@vscode/codicons": "0.0.43",

src/App.css

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
--dialog-background: white;
1212
--dialog-foreground: var(--foreground);
13+
--dialog-inactiveBorder: #B0B0B0;
1314

1415
--card-border: #E8EAED;
1516
--card-background: #F7F7F9;
@@ -142,6 +143,7 @@ body {
142143
}
143144

144145
#score-book-viewer {
146+
position: relative;
145147
padding: 40px;
146148

147149
flex: 1 1 auto;
@@ -173,6 +175,7 @@ body {
173175
}
174176

175177
.arrangement-controls {
178+
position: relative;
176179
display: flex;
177180
padding: 20pt;
178181
border-bottom: var(--thick-border);
@@ -188,16 +191,21 @@ body {
188191
}
189192

190193
.playback-control img {
191-
height: 18pt;
192-
width: 18pt;
194+
margin: 4px;
195+
height: 12pt;
196+
width: 12pt;
193197
}
194198

195199
.time-controls-wrapper {
196200
display: flex;
197201
}
198202

199203
.time-control {
200-
padding: 9.75pt 12pt;
204+
padding: 9pt 12pt;
205+
}
206+
207+
.time-control > span {
208+
margin-left: 4px;
201209
}
202210

203211
#share-button img {
@@ -416,6 +424,16 @@ select.long {
416424
width: 8pt;
417425
}
418426

427+
.track-meta .options-button.small {
428+
width: 12pt;
429+
height: 12pt;
430+
min-height: 0;
431+
min-width: 0;
432+
border-radius: 4px;
433+
padding: 2px;
434+
margin: 0 2px;
435+
}
436+
419437
.guiderail-wrapper {
420438
flex-grow: 1;
421439
}
@@ -470,6 +488,7 @@ select.long {
470488
}
471489

472490
.note-line-wrapper {
491+
position: relative;
473492
flex-grow: 1;
474493
margin-left: calc(var(--track-meta-width) + var(--thick-border-width));
475494
border-bottom: var(--thick-border);
@@ -662,6 +681,11 @@ select.long {
662681
padding: 5pt;
663682
}
664683

684+
.arrangement-viewer,
685+
.arrangement-viewer-body {
686+
position: relative;
687+
}
688+
665689
.instrument-chooser {
666690
height: 50pt;
667691
width: 70pt;
@@ -919,15 +943,18 @@ select.long {
919943

920944
background: var(--dialog-background);
921945
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
922-
border-radius: 16px;
923946

924947
padding: 20pt;
925948
transition: opacity 0.2s;
926949
}
927950

951+
#scoreTreeHost {
952+
height: 100%;
953+
min-height: 0;
954+
}
955+
928956
#scoreTreeHost .scoreTreeEntry > .actionBox {
929957
display: none;
930-
flex: 1;
931958
justify-content: flex-end;
932959
overflow: hidden;
933960
min-width: fit-content;
@@ -965,7 +992,9 @@ select.long {
965992
}
966993

967994
#libraryPaneContent {
968-
flex: 1;
995+
flex: 1 1 auto;
996+
min-height: 0;
997+
height: 100%;
969998
margin-right: 10px;
970999

9711000
padding: 8px;
@@ -1001,10 +1030,23 @@ select.long {
10011030
margin-right: 8px;
10021031
}
10031032

1033+
.scoreTreeIcon.score {
1034+
color: cornflowerblue;
1035+
}
1036+
10041037
.scoreTreeEntry {
10051038
display: flex;
10061039
align-items: center;
1040+
min-width: 0;
1041+
width: 100%;
1042+
}
1043+
1044+
.scoreTreeEntry > .label {
10071045
flex: 1 1 auto;
1046+
min-width: 0;
1047+
overflow: hidden;
1048+
text-overflow: ellipsis;
1049+
white-space: nowrap;
10081050
}
10091051

10101052
#transcriptionPaneContent {

0 commit comments

Comments
 (0)