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

Update Sorter's public widget option function to use custom seed generation for shuffle #2215

Merged
merged 102 commits into from
Feb 18, 2025

Conversation

Myranae
Copy link
Contributor

@Myranae Myranae commented Feb 7, 2025

Summary:

To shuffle server-side, we need to set up a seed other than the problemNum. We decided just to use Random.math for the seed. Once Sorter is receiving public widget options from the server, we can remove the client-side shuffle to ensure answer data is not transmitted to the client.

Issue: LEMS-2846

Test plan:

  • Confirm all checks pass
  • Confirm Sorter still works as expected.

…options

And add type definition of the public widget options
…rt function to filter out rubric data from widget options for the Matcher widget
…tcher-split

# Conflicts:
#	packages/perseus-core/src/index.ts
…tcher-split

# Conflicts:
#	packages/perseus-core/src/index.ts
#	packages/perseus/src/types.ts
#	packages/perseus/src/widgets/sorter/sorter.tsx
…tcher-split

# Conflicts:
#	packages/perseus-core/src/index.ts
#	packages/perseus/src/types.ts
Removes reference to problemNum as the seed
…tcher-split

# Conflicts:
#	packages/perseus/src/types.ts
#	packages/perseus/src/widgets/categorizer/categorizer.tsx
#	packages/perseus/src/widgets/radio/radio.ts
#	packages/perseus/src/widgets/sorter/sorter.tsx
Base automatically changed from tb/LEMS-2761/matcher-split to main February 18, 2025 17:28
@Myranae Myranae merged commit 62ed407 into main Feb 18, 2025
8 checks passed
@Myranae Myranae deleted the tb/LEMS-2846/update-sorter branch February 18, 2025 18:12
SonicScrewdriver added a commit that referenced this pull request Feb 18, 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/[email protected]

### Minor Changes

- [#2242](#2242)
[`e187c6b67`](e187c6b)
Thanks [@benchristel](https://github.com/benchristel)! - Deprecate the
`metadata` field in renderer, hint, and Group widget data schemas.


- [#2156](#2156)
[`cbd5a6528`](cbd5a65)
Thanks [@Myranae](https://github.com/Myranae)! - Implement a widget
export function to filter out rubric data from widget options for the
Matcher widget

### Patch Changes

- [#2215](#2215)
[`62ed407b8`](62ed407)
Thanks [@Myranae](https://github.com/Myranae)! - Update Sorter's public
widget option function to use Math.random and shuffle

- Updated dependencies
\[[`bae77a63c`](bae77a6),
[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Minor Changes

- [#2246](#2246)
[`e63f83d0d`](e63f83d)
Thanks [@benchristel](https://github.com/benchristel)! - Update
`parseAndMigratePerseusItem` and `parseAndMigratePerseusArticle` to
accept legacy data formats observed in production


- [#2242](#2242)
[`e187c6b67`](e187c6b)
Thanks [@benchristel](https://github.com/benchristel)! - Deprecate the
`metadata` field in renderer, hint, and Group widget data schemas.


- [#2215](#2215)
[`62ed407b8`](62ed407)
Thanks [@Myranae](https://github.com/Myranae)! - Update Sorter's public
widget option function to use Math.random and shuffle


- [#2156](#2156)
[`cbd5a6528`](cbd5a65)
Thanks [@Myranae](https://github.com/Myranae)! - Implement a widget
export function to filter out rubric data from widget options for the
Matcher widget

## @khanacademy/[email protected]

### Minor Changes

- [#2242](#2242)
[`e187c6b67`](e187c6b)
Thanks [@benchristel](https://github.com/benchristel)! - Deprecate the
`metadata` field in renderer, hint, and Group widget data schemas.

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- [#2240](#2240)
[`bae77a63c`](bae77a6)
Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! -
[Linter] Remove Math Font Size rule from editor linter

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]

## @khanacademy/[email protected]

### Patch Changes

- Updated dependencies
\[[`bae77a63c`](bae77a6),
[`e63f83d0d`](e63f83d),
[`e187c6b67`](e187c6b),
[`62ed407b8`](62ed407),
[`cbd5a6528`](cbd5a65)]:
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
    -   @khanacademy/[email protected]
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.

3 participants