Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap text node to reduce Google Translate bug #1814

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/rude-spies-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

Wraps a text node in a `span` to reduce bugs caused by Google Translate
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -387,7 +389,9 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -551,7 +555,9 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -715,7 +721,9 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -879,7 +887,9 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
E
<span>
E
</span>
</div>
</div>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ exports[`group widget should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -309,7 +311,9 @@ exports[`group widget should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -421,7 +425,9 @@ exports[`group widget should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -533,7 +539,9 @@ exports[`group widget should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -645,7 +653,9 @@ exports[`group widget should snapshot: initial render 1`] = `
<div
class="innerWrapper_177sg8x"
>
E
<span>
E
</span>
</div>
</div>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ exports[`multi-choice question should snapshot the same when invalid: invalid st
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -244,7 +246,9 @@ exports[`multi-choice question should snapshot the same when invalid: invalid st
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -356,7 +360,9 @@ exports[`multi-choice question should snapshot the same when invalid: invalid st
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -459,7 +465,9 @@ exports[`multi-choice question should snapshot the same when invalid: invalid st
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -693,7 +701,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -818,7 +828,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -930,7 +942,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1045,7 +1059,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1253,7 +1269,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1378,7 +1396,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1490,7 +1510,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1605,7 +1627,9 @@ exports[`single-choice question reviewMode: false should snapshot the same with
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1813,7 +1837,9 @@ exports[`single-choice question reviewMode: false should snapshot the same: firs
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -1938,7 +1964,9 @@ exports[`single-choice question reviewMode: false should snapshot the same: firs
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2050,7 +2078,9 @@ exports[`single-choice question reviewMode: false should snapshot the same: firs
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2165,7 +2195,9 @@ exports[`single-choice question reviewMode: false should snapshot the same: firs
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2373,7 +2405,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with c
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2498,7 +2532,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with c
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2610,7 +2646,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with c
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2725,7 +2763,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with c
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -2933,7 +2973,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with i
<div
class="innerWrapper_177sg8x"
>
A
<span>
A
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -3058,7 +3100,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with i
<div
class="innerWrapper_177sg8x"
>
B
<span>
B
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -3170,7 +3214,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with i
<div
class="innerWrapper_177sg8x"
>
C
<span>
C
</span>
</div>
</div>
</span>
Expand Down Expand Up @@ -3285,7 +3331,9 @@ exports[`single-choice question reviewMode: true should snapshot the same with i
<div
class="innerWrapper_177sg8x"
>
D
<span>
D
</span>
</div>
</div>
</span>
Expand Down
Loading