From 9a6517ca22857921acdbf206c7c21d989cccdf86 Mon Sep 17 00:00:00 2001 From: Nisha Yerunkar Date: Mon, 17 Jun 2024 12:16:32 -0700 Subject: [PATCH] [Interactive Graph Editor] Add blue and gold back as colors for locked figures (#1351) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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: https://github.com/Khan/perseus/commit/2d3c3b49a652020e5bf662b7b19682fa94212755#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' Screenshot 2024-06-13 at 3 42 54 PM 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: https://github.com/Khan/perseus/pull/1351 --- .changeset/sweet-jokes-poke.md | 6 ++++++ packages/perseus/src/perseus-types.ts | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/sweet-jokes-poke.md diff --git a/.changeset/sweet-jokes-poke.md b/.changeset/sweet-jokes-poke.md new file mode 100644 index 0000000000..4c8a9a5cbd --- /dev/null +++ b/.changeset/sweet-jokes-poke.md @@ -0,0 +1,6 @@ +--- +"@khanacademy/perseus": minor +"@khanacademy/perseus-editor": minor +--- + +[Interactive Graph Editor] Add blue and gold to locked figures colorset diff --git a/packages/perseus/src/perseus-types.ts b/packages/perseus/src/perseus-types.ts index c674f1f30f..6b8420c786 100644 --- a/packages/perseus/src/perseus-types.ts +++ b/packages/perseus/src/perseus-types.ts @@ -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 = { + blue: "#3D7586", green: "#447A53", grayH: "#3B3D45", purple: "#594094", pink: "#B25071", red: "#D92916", + orange: "#946700", } as const; export type LockedFigure =