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

[Dropdown] Bugfix - Render options and placeholder inline #2054

Merged
merged 7 commits into from
Dec 20, 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/hungry-taxis-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

[Dropdown] Bugfix - Render options and placeholder inline
30 changes: 18 additions & 12 deletions packages/perseus/src/__tests__/__snapshots__/renderer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,14 @@ exports[`renderer snapshots correct answer: correct answer 1`] = `
class="perseus-renderer perseus-renderer-responsive"
>
<div
class=""
class="paragraph"
data-perseus-paragraph-index="0"
>
less than or equal to
<div
class="paragraph"
>
less than or equal to
</div>
</div>
</div>
</span>
Expand Down Expand Up @@ -471,10 +475,14 @@ exports[`renderer snapshots incorrect answer: incorrect answer 1`] = `
class="perseus-renderer perseus-renderer-responsive"
>
<div
class=""
class="paragraph"
data-perseus-paragraph-index="0"
>
greater than or equal to
<div
class="paragraph"
>
greater than or equal to
</div>
</div>
</div>
</span>
Expand Down Expand Up @@ -559,16 +567,14 @@ exports[`renderer snapshots initial render: initial render 1`] = `
class="perseus-renderer perseus-renderer-responsive"
>
<div
class=""
class="paragraph"
data-perseus-paragraph-index="0"
>
greater
</div>
<div
class=""
data-perseus-paragraph-index="1"
>
/less than or equal to
<div
class="paragraph"
>
greater/less than or equal to
</div>
</div>
</div>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ exports[`Dropdown widget should snapshot when opened: dropdown open 1`] = `
class="perseus-renderer perseus-renderer-responsive"
>
<div
class=""
class="paragraph"
data-perseus-paragraph-index="0"
>
greater
</div>
<div
class=""
data-perseus-paragraph-index="1"
>
/less than or equal to
<div
class="paragraph"
>
greater/less than or equal to
</div>
</div>
</div>
</span>
Expand Down Expand Up @@ -138,16 +136,14 @@ exports[`Dropdown widget should snapshot: initial render 1`] = `
class="perseus-renderer perseus-renderer-responsive"
>
<div
class=""
class="paragraph"
data-perseus-paragraph-index="0"
>
greater
</div>
<div
class=""
data-perseus-paragraph-index="1"
>
/less than or equal to
<div
class="paragraph"
>
greater/less than or equal to
</div>
</div>
</div>
</span>
Expand Down
2 changes: 0 additions & 2 deletions packages/perseus/src/widgets/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class Dropdown extends React.Component<Props> implements Widget {
<Renderer
content={this.props.placeholder}
strings={this.context.strings}
inline
/>
}
labelAsText={this.props.placeholder}
Expand All @@ -92,7 +91,6 @@ class Dropdown extends React.Component<Props> implements Widget {
<Renderer
content={choice}
strings={this.context.strings}
inline
/>
}
labelAsText={choice}
Expand Down
Loading