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

[Numeric Input] - Update styling to match modern inputs #1832

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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/two-turtles-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": minor
---

[Numeric Input] - Update the UI to match Expression widget

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -125,175 +125,173 @@ exports[`graded group widget should snapshot 1`] = `
<div
class="perseus-widget-container widget-nohighlight widget-inline-block"
>
<div>
<span>
<div>
<input
aria-invalid="false"
aria-label="Your answer:"
autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="input_1t4b01j-o_O-LabelMedium_1rew30o-o_O-default_53h0n9-o_O-input_19vw1dn"
id="input-with-examples-bnVtZXJpYy1pbnB1dCAx"
type="text"
value=""
/>
</div>
<span>
<div>
<input
aria-invalid="false"
aria-label="Your answer:"
autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="input_1t4b01j-o_O-LabelMedium_1rew30o-o_O-default_53h0n9-o_O-input_18b2c52"
id="input-with-examples-bnVtZXJpYy1pbnB1dCAx"
type="text"
value=""
/>
</div>
<div
style="position: relative; height: 0px; display: none;"
>
<div
style="position: relative; height: 0px; display: none;"
class="tooltipContainer"
style="position: absolute; left: 0px;"
>
<div
class="tooltipContainer"
style="position: absolute; left: 0px;"
style="display: block; position: relative; visibility: visible; left: 0px; top: -1px; width: 12px; height: 11px; margin-top: -1px; margin-bottom: -2px; z-index: 10;"
>
<div
style="display: block; position: relative; visibility: visible; left: 0px; top: -1px; width: 12px; height: 11px; margin-top: -1px; margin-bottom: -2px; z-index: 10;"
>
<div
style="display: block; height: 0px; width: 0px; position: absolute; left: 0px; top: -1px; border-right: 12px solid transparent; border-bottom: 12px solid #ccc;"
/>
<div
style="display: block; height: 0px; width: 0px; position: absolute; left: 1px; top: 1px; border-right: 10px solid transparent; border-bottom: 10px solid white;"
/>
</div>
style="display: block; height: 0px; width: 0px; position: absolute; left: 0px; top: -1px; border-right: 12px solid transparent; border-bottom: 12px solid #ccc;"
/>
<div
class="perseus-formats-tooltip preview-measure"
style="position: relative; top: 0px; left: 0px; border: 1px solid #ccc; box-shadow: 0 1px 3px #ccc; z-index: 9;"
style="display: block; height: 0px; width: 0px; position: absolute; left: 1px; top: 1px; border-right: 10px solid transparent; border-bottom: 10px solid white;"
/>
</div>
<div
class="perseus-formats-tooltip preview-measure"
style="position: relative; top: 0px; left: 0px; border: 1px solid #ccc; box-shadow: 0 1px 3px #ccc; z-index: 9;"
>
<div
id="input-with-examples-bnVtZXJpYy1pbnB1dCAx"
>
<div
id="input-with-examples-bnVtZXJpYy1pbnB1dCAx"
class="perseus-renderer perseus-renderer-responsive"
>
<div
class="perseus-renderer perseus-renderer-responsive"
class="paragraph"
data-perseus-paragraph-index="0"
>
<div
class="paragraph"
data-perseus-paragraph-index="0"
>
<ul>
<li>
<strong>
Your answer should be
</strong>
</li>
<li>
an integer, like
<ul>
<li>
<strong>
Your answer should be
</strong>
</li>
<li>
an integer, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
6
</span>
<span />
6
</span>
</li>
<li>
a
<em>
simplified proper
</em>
fraction, like
<span />
</span>
</li>
<li>
a
<em>
simplified proper
</em>
fraction, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
3/5
</span>
<span />
3/5
</span>
</li>
<li>
a
<em>
simplified improper
</em>
fraction, like
<span />
</span>
</li>
<li>
a
<em>
simplified improper
</em>
fraction, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
7/4
</span>
<span />
7/4
</span>
</li>
<li>
a mixed number, like
<span />
</span>
</li>
<li>
a mixed number, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
1\\ 3/4
</span>
<span />
1\\ 3/4
</span>
</li>
<li>
an
<em>
exact
</em>
decimal, like
<span />
</span>
</li>
<li>
an
<em>
exact
</em>
decimal, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
0.75
</span>
<span />
0.75
</span>
</li>
<li>
a multiple of pi, like
<span />
</span>
</li>
<li>
a multiple of pi, like
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
12\\ \\text{pi}
</span>
<span />
12\\ \\text{pi}
</span>
or
<span />
</span>
or
<span
style="white-space: nowrap;"
>
<span />
<span
style="white-space: nowrap;"
class="mock-TeX"
>
<span />
<span
class="mock-TeX"
>
2/3\\ \\text{pi}
</span>
<span />
2/3\\ \\text{pi}
</span>
</li>
</ul>
</div>
<span />
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</span>
</div>
</div>
</span>
</div>
</div>
</div>
Expand Down
Loading