-
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
[Hint Mode: Start Coords] Add separate flags for graph types #1465
Conversation
We want to be able to release the start coords UI even if only a subset of graph types are ready. To accomodate this, I'm adding individual flags for each graph type. Issue: none Test plan: Storybook - http://localhost:6006/?path=/docs/perseuseditor-widgets-interactive-graph--docs - Confirm that the UI shows up for the currently landed graphs - segment, ray, linear, linear-system, circle - Confirm that the UI does not show up for the graphs that are not done yet - sinusoid, quadratic, angle, polygon, point
Size Change: +1.04 kB (+0.12%) Total Size: 851 kB
ℹ️ View Unchanged
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1465 +/- ##
==========================================
+ Coverage 69.60% 70.43% +0.83%
==========================================
Files 507 510 +3
Lines 105019 105194 +175
Branches 7562 11408 +3846
==========================================
+ Hits 73099 74095 +996
+ Misses 31731 31099 -632
+ Partials 189 0 -189
... and 158 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -473,7 +473,7 @@ class InteractiveGraphEditor extends React.Component<Props> { | |||
</LabeledRow> | |||
)} | |||
{this.props.graph?.type && | |||
this.props.apiOptions?.flags?.mafs?.["start-coords-ui"] && ( | |||
(this.props.apiOptions?.flags?.mafs?.["start-coords-ui"][this.props.graph.type]) && ( |
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 think this needs to be
(this.props.apiOptions?.flags?.mafs?.["start-coords-ui"][this.props.graph.type]) && ( | |
(this.props.apiOptions?.flags?.mafs?.["start-coords-ui"]?.[this.props.graph.type]) && ( |
or it will throw an error when mafs["start-coords-ui"]
is undefined.
EDIT: oh, I see that ["start-coords-ui"]
is a required property. I guess this is okay, then, because TypeScript will make sure start-coords-ui
is always an object when the flags are set in webapp.
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 looks good to me. I kind of wonder if it will be hard to manage all these different flags, e.g. to know which ones are turned on in Growthbook, turn them on for everyone who needs to playtest, etc. I might prefer to have milestone-based flags like we do for locked features. But I'm okay with it either way.
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
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.
LGTM!
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 - [#1468](#1468) [`af68a9e08`](af68a9e) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add start coords UI for sinusoid graphs - [#1469](#1469) [`6e1ec850c`](6e1ec85) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add start coords UI for quadratic graphs ### Patch Changes - [#1470](#1470) [`942b0a9a5`](942b0a9) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph Locked Figures] Remove m2 flag from the code - [#1465](#1465) [`94ad04fee`](94ad04f) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add separate flags for graph types - [#1432](#1432) [`ed6737025`](ed67370) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Bug fix to ensure that new angle graphs are scored correctly. ## @khanacademy/[email protected] ### Minor Changes - [#1468](#1468) [`af68a9e08`](af68a9e) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add start coords UI for sinusoid graphs - [#1469](#1469) [`6e1ec850c`](6e1ec85) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add start coords UI for quadratic graphs ### Patch Changes - [#1470](#1470) [`942b0a9a5`](942b0a9) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph Locked Figures] Remove m2 flag from the code - [#1465](#1465) [`94ad04fee`](94ad04f) Thanks [@nishasy](https://github.com/nishasy)! - [Hint Mode: Start Coords] Add separate flags for graph types - Updated dependencies \[[`af68a9e08`](af68a9e), [`942b0a9a5`](942b0a9), [`6e1ec850c`](6e1ec85), [`94ad04fee`](94ad04f), [`ed6737025`](ed67370)]: - @khanacademy/[email protected]
Summary:
We want to be able to release the start coords UI even if
only a subset of graph types are ready. To accomodate this,
I'm adding individual flags for each graph type.
Issue: none
Test plan:
Storybook