Skip to content

Commit

Permalink
make the trig buttons real text so they can be translated (#1497)
Browse files Browse the repository at this point in the history
## Summary:
It looks basically the same, but now it can be translated.

Previously "sin", "cos", and "tan" were SVGs.

<img width="443" alt="Screenshot 2024-08-07 at 2 32 50 PM" src="https://github.com/user-attachments/assets/0fac40b5-6ab3-4639-9474-13c91d59ba66">

Issue: LEMS-1621

## Test plan:

Author: handeyeco

Reviewers: benchristel

Required Reviewers:

Approved By: benchristel

Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1497
  • Loading branch information
handeyeco authored Aug 13, 2024
1 parent 182c8f6 commit 5b6b976
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-eagles-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/math-input": patch
---

Switch trig keys from SVG to text
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -221,7 +221,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -253,7 +253,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -285,7 +285,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -317,7 +317,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -349,7 +349,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -381,7 +381,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -413,7 +413,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -445,7 +445,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -477,7 +477,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -509,7 +509,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
data-testid="period-decimal"
Expand Down Expand Up @@ -542,7 +542,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -576,7 +576,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -610,7 +610,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -644,7 +644,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -684,7 +684,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -718,7 +718,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -767,7 +767,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -801,7 +801,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -835,7 +835,7 @@ exports[`keypad should snapshot expanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_wps3dh"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_wps3dh"
>
<svg
fill="none"
Expand Down Expand Up @@ -1245,7 +1245,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1277,7 +1277,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1309,7 +1309,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1341,7 +1341,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1373,7 +1373,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1405,7 +1405,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1437,7 +1437,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1469,7 +1469,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1501,7 +1501,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1533,7 +1533,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1565,7 +1565,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
data-testid="period-decimal"
Expand Down Expand Up @@ -1598,7 +1598,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb"
class="default_xu2jcg-o_O-base_muxx52"
>
<svg
fill="none"
Expand Down Expand Up @@ -1632,7 +1632,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1666,7 +1666,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1700,7 +1700,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1740,7 +1740,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1774,7 +1774,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1823,7 +1823,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1857,7 +1857,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_s65xgl"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_s65xgl"
>
<svg
fill="none"
Expand Down Expand Up @@ -1891,7 +1891,7 @@ exports[`keypad should snapshot unexpanded: first render 1`] = `
class="default_xu2jcg-o_O-outerBoxBase_3w5jmh"
>
<div
class="default_xu2jcg-o_O-base_7gd6lb-o_O-inlineStyles_wps3dh"
class="default_xu2jcg-o_O-base_muxx52-o_O-inlineStyles_wps3dh"
>
<svg
fill="none"
Expand Down
Loading

0 comments on commit 5b6b976

Please sign in to comment.