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
Show Arrowheads on Locked Lines #1229
Conversation
Move arrowhead property values to a util function. Add arrowheads to lines.
… set to 'true'. Update tests and snapshots accordingly.
Size Change: +112 B (0%) Total Size: 833 kB
ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1229 +/- ##
==========================================
+ Coverage 68.64% 70.34% +1.70%
==========================================
Files 470 474 +4
Lines 100733 100836 +103
Branches 7146 10853 +3707
==========================================
+ Hits 69148 70934 +1786
+ Misses 31406 29902 -1504
+ Partials 179 0 -179
... and 133 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
… added to the graph.
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx
Show resolved
Hide resolved
packages/perseus/src/widgets/interactive-graphs/locked-line.tsx
Outdated
Show resolved
Hide resolved
@@ -1159,6 +1159,120 @@ export const segmentWithLockedLineQuestion: PerseusRenderer = { | |||
}, | |||
}; | |||
|
|||
export const segmentWithLockedLineAndArrowheadsQuestion: PerseusRenderer = { |
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.
suggestion: we now have an InteractiveGraphQuestionBuilder
class that could help abbreviate test data definitions like this. It doesn't yet have a way to add locked figures, but you could add that fairly easily I think.
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.
I'd be down to add that functionality for locked figures in a future PR. I can make an M2 ticket for it.
packages/perseus/src/widgets/interactive-graphs/graphs/components/vector.tsx
Show resolved
Hide resolved
packages/perseus/src/widgets/interactive-graphs/graphs/utils.ts
Outdated
Show resolved
Hide resolved
packages/perseus/src/widgets/interactive-graphs/graphs/utils.ts
Outdated
Show resolved
Hide resolved
packages/perseus/src/widgets/interactive-graphs/locked-line.tsx
Outdated
Show resolved
Hide resolved
packages/perseus/src/widgets/interactive-graphs/locked-line.tsx
Outdated
Show resolved
Hide resolved
…rrows also (prior changes removed that feature). Implement other PR comment suggestions.
Adjust tests accordingly. Add unit tests for Arrowhead.
Fix lint errors.
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (27d720f) and published it to npm. You Example: yarn add @khanacademy/perseus@PR1229 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR1229 |
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.
Very exciting!
@@ -1159,6 +1159,120 @@ export const segmentWithLockedLineQuestion: PerseusRenderer = { | |||
}, | |||
}; | |||
|
|||
export const segmentWithLockedLineAndArrowheadsQuestion: PerseusRenderer = { |
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.
I'd be down to add that functionality for locked figures in a future PR. I can make an M2 ticket for it.
packages/perseus/src/widgets/interactive-graphs/graphs/components/arrowhead.test.tsx
Show resolved
Hide resolved
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@22.4.0 ### Minor Changes - [#1229](#1229) [`3c1e398d5`](3c1e398) Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! - Show Arrowheads on Locked Lines in Interactive Graphs - [#1237](#1237) [`54689a18f`](54689a1) Thanks [@handeyeco](https://github.com/handeyeco)! - Rough out new Circle Graph behind a feature flag ### Patch Changes - [#1222](#1222) [`44cf7348c`](44cf734) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Fix @phosphor-icon paths in `explanation` widget - [#1243](#1243) [`ee89a1b01`](ee89a1b) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Fix dash style for locked lines when kind is 'ray' ## @khanacademy/perseus-editor@6.2.1 ### Patch Changes - [#1237](#1237) [`54689a18f`](54689a1) Thanks [@handeyeco](https://github.com/handeyeco)! - Rough out new Circle Graph behind a feature flag - [#1246](#1246) [`d66b79e44`](d66b79e) Thanks [@nishasy](https://github.com/nishasy)! - Change locked figures' initial color to grayH (previusly green) - [#1242](#1242) [`7d172698e`](7d17269) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Adds a warning above the protractor and ruler checkboxes in interactive-graph settings - [#1245](#1245) [`45a6647cf`](45a6647) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Fix location of DeviceFramer and ViewportResizer in Storybook - Updated dependencies \[[`44cf7348c`](44cf734), [`3c1e398d5`](3c1e398), [`ee89a1b01`](ee89a1b), [`54689a18f`](54689a1)]: - @khanacademy/perseus@22.4.0 ## @khanacademy/perseus-dev-ui@1.5.5 ### Patch Changes - [#1222](#1222) [`44cf7348c`](44cf734) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - ✨ Display image background info in Dev UI
Summary:
Arrowheads on locked lines apply only to rays and lines, not line segments. Previously, showing arrows was an option that could be turned "off" on a per-line basis. After reviewing the use cases for locked features, it was determined that this option should not exist - lines and rays should always have arrowheads.
Issue: LEMS-1929
Test plan:
yarn start
to launch Storybook.Affected behavior:
With arrows