Skip to content

Commit 05e2eaa

Browse files
vanshika2720Vanshika
andauthored
Fix tour arrow overlap with modal text content (#5296)
* Fix tour arrow overlap and update abc tests - Move arrows to the edges of the dialog (right: 25px, left: 10px) to prevent overlap. - Increase clearance in the help dialog body to avoid collision with arrows. - Update abc.test.js to match the current precise output format of the abc engine. * Revert abc.test.js changes to focus PR on navigation arrow fix only * Fix abc.test.js to match upstream master Remove unintended whitespace changes in test expectations * Fix Prettier formatting in abc.test.js The ESLint workflow failed because abc.test.js had Prettier formatting issues (unquoted numeric object keys). This commit fixes only the code style without changing test behavior or any functional code. --------- Co-authored-by: Vanshika <vanshika@198625@gmail.com>
1 parent 2743ff7 commit 05e2eaa

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

css/activities.css

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,12 +1051,12 @@ table {
10511051
}
10521052

10531053
#right-arrow {
1054-
left: 385px;
1054+
right: 25px;
10551055
background: url("../header-icons/right-arrow.png");
10561056
}
10571057

10581058
#left-arrow {
1059-
left: 5px;
1059+
left: 10px;
10601060
background: url("../header-icons/left-arrow.png");
10611061
}
10621062

@@ -1177,12 +1177,14 @@ table {
11771177

11781178
#helpBodyDiv {
11791179
position: relative;
1180-
left: 45px;
1180+
margin: 0 auto !important;
1181+
left: 0 !important;
11811182
border: 0 !important;
11821183
overflow-x: hidden;
11831184
overflow-y: auto;
1184-
width: 350px;
1185-
padding: 1rem 1rem 0 0;
1185+
width: calc(100% - 130px) !important;
1186+
max-width: 350px;
1187+
padding: 1rem 1rem 0 1rem;
11861188
display: flex;
11871189
flex-direction: column;
11881190
justify-content: center;
@@ -2107,7 +2109,7 @@ table {
21072109

21082110
#right-arrow {
21092111
left: auto !important; /* Unset the old fixed pixel value */
2110-
right: 10px !important; /* Stick to the right edge */
2112+
right: 25px !important; /* Stick to the right edge */
21112113
}
21122114

21132115
/* --- Desktop View (Screens wider than 900px) --- */
@@ -2138,7 +2140,8 @@ table {
21382140

21392141
/* Fix the inner text box width so it doesn't overflow */
21402142
#helpBodyDiv {
2141-
width: 100% !important;
2143+
width: calc(100% - 110px) !important;
2144+
margin: 0 auto !important;
21422145
left: 0 !important;
21432146
padding: 0 10px;
21442147
box-sizing: border-box;

js/__tests__/abc.test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ describe("processABCNotes - Basic Note Processing", () => {
5353

5454
beforeEach(() => {
5555
logo = {
56-
notationNotes: { "0": "" },
56+
notationNotes: { 0: "" },
5757
notation: {
5858
notationStaging: {
59-
"0": [
59+
0: [
6060
[["G♯4"], 4, 0, null, null, -1, false],
6161
[["F4"], 4, 0, null, null, -1, false],
6262
[["G♯4"], 2, 0, null, null, -1, false]
@@ -88,7 +88,7 @@ describe("processABCNotes - Advanced Note Handling", () => {
8888
let logo;
8989

9090
beforeEach(() => {
91-
logo = { notationNotes: { "0": "" }, notation: { notationStaging: { "0": [] } } };
91+
logo = { notationNotes: { 0: "" }, notation: { notationStaging: { 0: [] } } };
9292
});
9393

9494
it("should handle frequency (number) inputs", () => {
@@ -125,7 +125,7 @@ describe("processABCNotes - Advanced Note Handling", () => {
125125
describe("processABCNotes - Control Strings", () => {
126126
let logo;
127127
beforeEach(() => {
128-
logo = { notationNotes: { "0": "" }, notation: { notationStaging: { "0": [] } } };
128+
logo = { notationNotes: { 0: "" }, notation: { notationStaging: { 0: [] } } };
129129
});
130130

131131
it("should handle all string commands correctly", () => {
@@ -182,7 +182,7 @@ describe("processABCNotes - Control Strings", () => {
182182
describe("processABCNotes - Chords", () => {
183183
let logo;
184184
beforeEach(() => {
185-
logo = { notationNotes: { "0": "" }, notation: { notationStaging: { "0": [] } } };
185+
logo = { notationNotes: { 0: "" }, notation: { notationStaging: { 0: [] } } };
186186
});
187187

188188
it("should handle chords correctly (Start, Middle, End)", () => {
@@ -218,7 +218,7 @@ describe("processABCNotes - Chords", () => {
218218
describe("processABCNotes - Tuplet Handling", () => {
219219
let logo;
220220
beforeEach(() => {
221-
logo = { notationNotes: { "0": "" }, notation: { notationStaging: { "0": [] } } };
221+
logo = { notationNotes: { 0: "" }, notation: { notationStaging: { 0: [] } } };
222222
});
223223

224224
it("should process standard tuplets correctly", () => {
@@ -270,7 +270,7 @@ describe("processABCNotes - Edge Cases for 100% Coverage", () => {
270270
let logo;
271271

272272
beforeEach(() => {
273-
logo = { notationNotes: { "0": "" }, notation: { notationStaging: { "0": [] } } };
273+
logo = { notationNotes: { 0: "" }, notation: { notationStaging: { 0: [] } } };
274274
});
275275

276276
it("should handle array of notes in NOTATIONNOTE field", () => {
@@ -321,10 +321,10 @@ describe("saveAbcOutput", () => {
321321
activity = {
322322
logo: {
323323
notationOutput: "",
324-
notationNotes: { "0": "" },
324+
notationNotes: { 0: "" },
325325
notation: {
326326
notationStaging: {
327-
"0": [[["G♯4"], 4, 0, null, null, -1, false]]
327+
0: [[["G♯4"], 4, 0, null, null, -1, false]]
328328
}
329329
}
330330
},
@@ -353,10 +353,10 @@ describe("saveAbcOutput", () => {
353353
describe("processABCNotes - Tuplet Handling", () => {
354354
it("should process tuplets correctly", () => {
355355
const logo = {
356-
notationNotes: { "0": "" },
356+
notationNotes: { 0: "" },
357357
notation: {
358358
notationStaging: {
359-
"0": [
359+
0: [
360360
[["G♯4"], 4, 0, 3, 2, -1, false],
361361
[["F4"], 4, 0, 3, 2, -1, false],
362362
[["G♯4"], 4, 0, 3, 2, -1, false]

0 commit comments

Comments
 (0)