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

feat(LEMS-2272): Add scientific notation button to the first tab of expression widget #1738

Merged
merged 14 commits into from
Jan 6, 2025

Conversation

anakaren-rojas
Copy link
Contributor

@anakaren-rojas anakaren-rojas commented Oct 9, 2024

Summary:

Adds scientific notation button to the first tab of expression widget when added via button sets in expression editor

Issue: LEMS-2272

Test plan:

In Expression Widget Editor, add scientific button to first tab by toggling the scientific option under the Button Sets section of the editor.

Expected Behavior

  1. Within the expression editor, toggle adds and removes scientific notation button
  2. When toggled, the first tab of expression widget has scientific notation button in the Shared Keys section and subsequent tabs of expression widget do NOT have scientific notation button in the Shared Keys section
  3. When not toggled, none of the tabs have the scientific notation button in the Shared Keys section of the widget
  4. Scientific Notation button maintains the same functionality as the original

Screen Recording:

Screen.Recording.2024-12-27.at.14.07.12.mov

@anakaren-rojas anakaren-rojas self-assigned this Oct 9, 2024
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Oct 9, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/tidy-suns-wait.md, packages/math-input/src/types.ts, packages/perseus/src/perseus-types.ts, packages/perseus/src/components/math-input.tsx, packages/perseus-editor/src/widgets/expression-editor.tsx, packages/math-input/src/components/keypad/keypad.tsx, packages/math-input/src/components/keypad/mobile-keypad-internals.tsx, packages/math-input/src/components/keypad/shared-keys.tsx, packages/perseus/src/components/__tests__/math-input.test.tsx, packages/perseus/src/widgets/expression/expression.test.tsx, packages/perseus/src/widgets/expression/expression.tsx, packages/perseus-editor/src/widgets/__tests__/expression-editor.test.tsx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@khan-actions-bot khan-actions-bot requested a review from a team October 9, 2024 23:40
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Size Change: +74 B (+0.01%)

Total Size: 1.27 MB

Filename Size Change
packages/math-input/dist/es/index.js 78 kB +58 B (+0.07%)
packages/perseus-editor/dist/es/index.js 688 kB +5 B (0%)
packages/perseus/dist/es/index.js 417 kB +11 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 4.93 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Oct 9, 2024

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (c733c2f) and published it to npm. You
can install it using the tag PR1738.

Example:

yarn add @khanacademy/perseus@PR1738

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR1738

@benchristel
Copy link
Member

@anakaren-rojas is this PR still needed? If not, can you close it? :)

@anakaren-rojas
Copy link
Contributor Author

@benchristel yes, ill create a znd for it this week and then close it out

@anakaren-rojas anakaren-rojas removed the request for review from a team November 7, 2024 20:51
@anakaren-rojas
Copy link
Contributor Author

anakaren-rojas commented Nov 18, 2024

Waiting on playtest and content approval before landing or closing

@khan-actions-bot khan-actions-bot requested a review from a team December 4, 2024 00:12
@anakaren-rojas anakaren-rojas removed the request for review from a team December 4, 2024 00:20
@khan-actions-bot khan-actions-bot requested a review from a team December 4, 2024 17:39
@anakaren-rojas
Copy link
Contributor Author

Will have a playtest next week

@anakaren-rojas anakaren-rojas changed the title POC code redo feat(LEMS-2272): Add scientific notation button to the first tab of expression widget Dec 27, 2024
Copy link
Member

@catandthemachines catandthemachines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks for adding this in and remember to await till holiday lockdown is over till landing in main. 😉

import type {UserEvent} from "@testing-library/user-event";

const allButtonSets = {
const allButtonSets: KeypadButtonSets = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! Thanks for adding typing. <3

@anakaren-rojas anakaren-rojas merged commit dbbc82f into main Jan 6, 2025
19 of 24 checks passed
@anakaren-rojas anakaren-rojas deleted the LEMS-2272-add-scientific-option-to-basic-keypad branch January 6, 2025 17:11
SonicScrewdriver added a commit that referenced this pull request Jan 6, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @khanacademy/math-input@22.1.0

### Minor Changes

- [#1738](#1738)
[`dbbc82f2d`](dbbc82f)
Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - add
scientific notation button / toggle to basic keypad

## @khanacademy/perseus@49.2.0

### Minor Changes

- [#1990](#1990)
[`37c642f24`](37c642f)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Allow
keyboards to navigate and interact with images


- [#1738](#1738)
[`dbbc82f2d`](dbbc82f)
Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - add
scientific notation button / toggle to basic keypad

### Patch Changes

- [#2061](#2061)
[`d8b2f7eaf`](d8b2f7e)
Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - update
terminology for angle sides


- [#2071](#2071)
[`bac10129b`](bac1012)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - This
patch fixes our Perseus strings to ensure that they are double escaped
for Lingui.


- [#1952](#1952)
[`617377147`](6173771)
Thanks [@benchristel](https://github.com/benchristel)! - Internal: add
and pass more regression tests for PerseusItem parser


- [#2059](#2059)
[`53ba9f5d1`](53ba9f5)
Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! -
[Dropdown] Bugfix - Text in dropdown was shifted up after adding TeX
support via Renderer

- Updated dependencies
\[[`dbbc82f2d`](dbbc82f)]:
    -   @khanacademy/math-input@22.1.0

## @khanacademy/perseus-editor@17.1.0

### Minor Changes

- [#1738](#1738)
[`dbbc82f2d`](dbbc82f)
Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - add
scientific notation button / toggle to basic keypad

### Patch Changes

- Updated dependencies
\[[`d8b2f7eaf`](d8b2f7e),
[`bac10129b`](bac1012),
[`37c642f24`](37c642f),
[`617377147`](6173771),
[`dbbc82f2d`](dbbc82f),
[`53ba9f5d1`](53ba9f5)]:
    -   @khanacademy/perseus@49.2.0
    -   @khanacademy/math-input@22.1.0

## @khanacademy/perseus-dev-ui@5.0.10

### Patch Changes

- Updated dependencies
\[[`dbbc82f2d`](dbbc82f)]:
    -   @khanacademy/math-input@22.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants