Skip to content

Commit 4733bbb

Browse files
authored
[Expression] Fix missing border in mobile keypad (#2907)
## Summary: Fix missing border in custom mobile keypad to make the experience consistent with desktop, and it will not look weird when above some text or other content | Before | After | | ------- | ----- | | <img width="524" height="372" alt="image" src="https://github.com/user-attachments/assets/511af8c4-d631-437f-aae8-4cb2a1d89677" /> | <img width="294" height="588" alt="Screenshot 2025-09-17 at 4 00 36 PM" src="https://github.com/user-attachments/assets/1ab8b237-1101-4e1e-b1a6-b8fc29338692" /> | Issue: LEMS-2924 ## Test plan: 1. In mobile to Test Everything's Expression Widget `internal-courses/test-everything/test-everything-1/expression/a/expression-widget-for-level-access` 2. Confirm that the expression widget mobile keypad has visible border. Author: ivyolamit Reviewers: ivyolamit, jeremywiebe, #perseus, #lems Required Reviewers: Approved By: jeremywiebe Checks: ✅ 10 checks were successful Pull Request URL: #2907
1 parent d60a719 commit 4733bbb

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.changeset/wicked-monkeys-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@khanacademy/math-input": patch
3+
---
4+
5+
Fix missing border in mobile keypad

packages/math-input/src/components/keypad/__tests__/__snapshots__/mobile-keypad.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
exports[`mobile keypad should not render the keypad when not active 1`] = `
44
<div>
55
<div
6-
class="initial_4qg14c-o_O-keypadContainer_9ki71g"
6+
class="initial_4qg14c-o_O-keypadContainer_1jsjomm"
77
/>
88
</div>
99
`;
1010

1111
exports[`mobile keypad should render keypad when active 1`] = `
1212
<div>
1313
<div
14-
class="initial_4qg14c-o_O-keypadContainer_9ki71g"
14+
class="initial_4qg14c-o_O-keypadContainer_1jsjomm"
1515
>
1616
<div
1717
class="default_xu2jcg inlineStyles_6alflt"

packages/math-input/src/components/keypad/mobile-keypad-internals.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {semanticColor} from "@khanacademy/wonder-blocks-tokens";
12
import {StyleSheet} from "aphrodite";
23
import * as React from "react";
34
import ReactDOM from "react-dom";
@@ -243,6 +244,11 @@ const styles = StyleSheet.create({
243244
left: 0,
244245
right: 0,
245246
position: "fixed",
247+
// Having the border will make the experience consistent with the desktop
248+
// keypad which has a border.
249+
borderStyle: "solid",
250+
borderWidth: 1,
251+
borderColor: semanticColor.core.border.neutral.subtle,
246252
},
247253
});
248254

0 commit comments

Comments
 (0)