-
Notifications
You must be signed in to change notification settings - Fork 350
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
Make Mafs line segment color offBlack64 #1073
Conversation
We changed it (accidentally) to offBlack16 in #1067. This commit fixes it. I removed the `--mafs-line-color` custom property because it's no longer used. Issue: none Test plan: View a Mafs segment graph in the dev UI (`yarn dev`). Verify that the segment is a darker gray than the gridlines.
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (f4e3257) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1073 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1073 |
I wonder if we should have visual snapshot tests to catch regressions like this 🤔 Though I don't think it would necessarily have caught this particular case—this regression happened because Nisha and I both changed the Mafs CSS concurrently in contradictory ways. |
Size Change: 0 B Total Size: 810 kB ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1073 +/- ##
==========================================
+ Coverage 67.42% 68.78% +1.36%
==========================================
Files 436 438 +2
Lines 96523 96568 +45
Branches 6749 10293 +3544
==========================================
+ Hits 65079 66424 +1345
+ Misses 31444 30144 -1300 see 97 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
The screenshot is a Graphie background, not a Mafs grid |
@benchristel there's some confusion here-- the line segment color should use the "fg" variable, or foreground, not the "line-color" variable, which is for gridlines. Please check a Mafs grid and ensure the gridlines are the appropriate color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify that you are not causing a regression in the Mafs grid rendering
@@ -6,8 +6,6 @@ | |||
--mafs-bg: transparent; | |||
--mafs-fg: rgb(33, 36, 44); /* WB color.offBlack */ | |||
|
|||
--mafs-line-color: rgba(33, 36, 44, 0.16); /* WB color.offBlack16*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nishasy and I looked at this-- this variable is used for gridlines and needs to be offBlack16 or offBlack24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nedredmond I ended up changing it back to offBlack16, because I looked and offBlack24 is not there in WB. 24% was only added for certain colors, not black. My mistake!
@@ -23,7 +21,7 @@ | |||
} | |||
|
|||
.MafsView .movable-segment { | |||
--mafs-segment-stroke-color: var(--mafs-line-color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the wrong variable for segment stroke, should have been fg (or you can make it offBlack64 like you did)
I am getting the impression you mistakenly thought it was a Perseus-side custom variable. Unfortunately, Mafs doesn't have great documentation on the variables available. See its use here: https://github.com/stevenpetryk/mafs/blob/main/src/display/Coordinates/Cartesian.tsx Please restore it. Again, it's used to color gridlines. |
@nedredmond Thanks, and good catch. I had a brain fart and thought It's fixed now. |
Great! Sorry for repeating myself a bunch i reviewed on the GitHub app and couldn't see my comments |
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/perseus-dev-ui@1.3.0 ### Minor Changes - [#1071](#1071) [`eb637b35`](eb637b3) Thanks [@benchristel](https://github.com/benchristel)! - Add a "check answer" button to interactive graphs displayed in the dev flipbook UI ## @khanacademy/perseus@20.2.0 ### Minor Changes - [#1067](#1067) [`6196375a`](6196375) Thanks [@nishasy](https://github.com/nishasy)! - Can pass a point into `lockedFigures` into MafsGraph and a point will be displayed. - [#1074](#1074) [`a263e940`](a263e94) Thanks [@nishasy](https://github.com/nishasy)! - Add "add a locked figure" UI to interactive graph editor + adding points (mafs graphs only) ### Patch Changes - [#1068](#1068) [`881da724`](881da72) Thanks [@benchristel](https://github.com/benchristel)! - Adjust styling of the movable points and line segments on the Mafs segment graph - [#1071](#1071) [`eb637b35`](eb637b3) Thanks [@benchristel](https://github.com/benchristel)! - Add a "check answer" button to interactive graphs displayed in the dev flipbook UI - [#1073](#1073) [`ea0db7d9`](ea0db7d) Thanks [@benchristel](https://github.com/benchristel)! - Fix color of Mafs line segments ## @khanacademy/perseus-editor@5.1.0 ### Minor Changes - [#1074](#1074) [`a263e940`](a263e94) Thanks [@nishasy](https://github.com/nishasy)! - Add "add a locked figure" UI to interactive graph editor + adding points (mafs graphs only) ### Patch Changes - Updated dependencies \[[`881da724`](881da72), [`eb637b35`](eb637b3), [`6196375a`](6196375), [`a263e940`](a263e94), [`ea0db7d9`](ea0db7d)]: - @khanacademy/perseus@20.2.0 Author: khan-actions-bot Reviewers: benchristel Required Reviewers: Approved By: benchristel Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage, ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ⏭️ Publish npm snapshot, ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Extract i18n strings (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ gerald, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x) Pull Request URL: #1069
Summary:
We changed it (accidentally) to offBlack16 in
#1067. This commit fixes it.
Issue: none
Test plan:
View the Mafs segment graph in Storybook (http://localhost:6006/?path=/story/perseus-widgets-interactive-graph--segment-with-mafs-and-locked-points).
Verify that the segment is a darker gray than the gridlines.