Skip to content

Commit

Permalink
[Interactive Graph Editor] Add blue and gold back as colors for locke…
Browse files Browse the repository at this point in the history
…d figures (#1351)

## Summary:
At the moment, we only allow authors to use 5 colors for interactive graph
locked figures. However, there was a request to add blue and gold to the colorset.

- Adding blue and orange (formerly gold) to the colorset

Note that these colors were part of the original colorset. They were removed in the following commit:
2d3c3b4#diff-5737e5c75b244a64356894bb42c711539f1589cfbd9dcbbd4b22a3db8773d524 

Issue: none

## Test plan:
- http://localhost:6006/?path=/story/perseuseditor-editorpage--mafs-with-locked-figures-m-2-flag
- Confirm that blue and gold are present in the color dropdowns
- there should be 7 total colors'

<img width="185" alt="Screenshot 2024-06-13 at 3 42 54 PM" src="https://github.com/Khan/perseus/assets/13231763/00b05698-c8f1-4e42-8ca7-5b1f19fb8829">

Author: nishasy

Reviewers: Myranae, mark-fitzgerald, nishasy

Required Reviewers:

Approved By: Myranae, mark-fitzgerald

Checks: ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1351
  • Loading branch information
nishasy authored Jun 17, 2024
1 parent 1e877c6 commit 9a6517c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/sweet-jokes-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": minor
"@khanacademy/perseus-editor": minor
---

[Interactive Graph Editor] Add blue and gold to locked figures colorset
4 changes: 4 additions & 0 deletions packages/perseus/src/perseus-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,21 +653,25 @@ export type PerseusInteractiveGraphWidgetOptions = {
};

const lockedFigureColorNames = [
"blue",
"green",
"grayH",
"purple",
"pink",
"orange",
"red",
] as const;

export type LockedFigureColor = (typeof lockedFigureColorNames)[number];

export const lockedFigureColors: Record<LockedFigureColor, string> = {
blue: "#3D7586",
green: "#447A53",
grayH: "#3B3D45",
purple: "#594094",
pink: "#B25071",
red: "#D92916",
orange: "#946700",
} as const;

export type LockedFigure =
Expand Down

0 comments on commit 9a6517c

Please sign in to comment.