-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/update kd quiz question #213
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
69c58f7
equ plot shows Ki
meganrm 96023f7
format
meganrm ed462c2
separate context
meganrm 4bf2562
new context
meganrm 01751c9
add claude settings
meganrm 93669f9
ignore claude settings
meganrm e0b9f95
remove claude settings
meganrm 606713f
Merge branch 'main' of https://github.com/simularium/binding-sim-edu …
meganrm 8f18f1f
revert to main
meganrm a7fb9e1
fix bug where plots were getting added with only 0,0 as a value
meganrm 0948846
add a Ki question
meganrm c905ea3
Potential fix for pull request finding
meganrm db366ee
change name of variable
meganrm b2a4888
have a help popup when disabled
meganrm 1035c38
use satisfies
meganrm a1f8309
move into docs folder
meganrm 46ed355
remove personal notification setting
meganrm 0a92a61
remove whitespace
meganrm d7736e6
use createContext
meganrm f2f33f4
Merge branch 'fix/organize-state' of https://github.com/simularium/bi…
meganrm 5bc7c9e
Potential fix for pull request finding
meganrm 5f605df
make name more generic
meganrm fdfd995
change to div
meganrm 982a987
Potential fix for pull request finding
meganrm b4443b9
doc moved
meganrm 40e1502
Merge branch 'main' into fix/update-kd-quiz-question
meganrm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,16 @@ import Slider from "../shared/Slider"; | |
| import { useSimulariumAnalysis } from "../../hooks/useSimulationContext"; | ||
| import styles from "./concentration-slider.module.css"; | ||
| import classNames from "classnames"; | ||
| import HelpPopup from "../HelpPopup"; | ||
|
|
||
| interface SliderProps { | ||
| min: number; | ||
| max: number; | ||
| disabled?: boolean; | ||
| initialValue: number; | ||
| max: number; | ||
| min: number; | ||
| name: string; | ||
| onChange: (name: string, value: number) => void; | ||
| onChangeComplete?: (name: string, value: number) => void; | ||
| name: string; | ||
| } | ||
|
|
||
| const Mark: React.FC<{ | ||
|
|
@@ -53,12 +55,13 @@ const Mark: React.FC<{ | |
| }; | ||
|
|
||
| const ConcentrationSlider: React.FC<SliderProps> = ({ | ||
| min, | ||
| max, | ||
| disabled, | ||
| initialValue, | ||
| max, | ||
| min, | ||
| name, | ||
| onChange, | ||
| onChangeComplete, | ||
| name, | ||
| }) => { | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| const disabledNumbers = [0]; | ||
|
|
@@ -75,26 +78,39 @@ const ConcentrationSlider: React.FC<SliderProps> = ({ | |
| : index | ||
| } | ||
| disabledNumbers={disabledNumbers} | ||
| onMouseUp={() => onChangeComplete?.(name, index)} | ||
| onMouseUp={ | ||
| disabled | ||
| ? () => {} | ||
| : () => onChangeComplete?.(name, index) | ||
| } | ||
| /> | ||
| ), | ||
| }; | ||
| } | ||
| return marks; | ||
| }, [min, max, disabledNumbers, onChangeComplete, name, stepSize]); | ||
| }, [min, max, disabledNumbers, disabled, onChangeComplete, name, stepSize]); | ||
| return ( | ||
| <Slider | ||
| initialValue={initialValue} | ||
| className={styles.container} | ||
| name={name} | ||
| min={min} | ||
| max={max} | ||
| step={stepSize} | ||
| onChange={onChange} | ||
| onChangeComplete={onChangeComplete} | ||
| marks={marks} | ||
| disabledNumbers={disabledNumbers} | ||
| /> | ||
| <HelpPopup | ||
| content="You need to measure a baseline value before you can add any of the inhibitor" | ||
| trigger="hover" | ||
| open={disabled ? undefined : false} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does it mean for |
||
| > | ||
| <div style={{ width: "100%" }}> | ||
| <Slider | ||
| disabled={disabled} | ||
| initialValue={initialValue} | ||
| className={styles.container} | ||
| name={name} | ||
| min={min} | ||
| max={max} | ||
| step={stepSize} | ||
| onChange={onChange} | ||
| onChangeComplete={onChangeComplete} | ||
| marks={marks} | ||
| disabledNumbers={disabledNumbers} | ||
| /> | ||
| </div> | ||
| </HelpPopup> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.