Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
69c58f7
equ plot shows Ki
meganrm Feb 17, 2026
96023f7
format
meganrm Mar 9, 2026
ed462c2
separate context
meganrm Mar 9, 2026
4bf2562
new context
meganrm Mar 27, 2026
01751c9
add claude settings
meganrm Mar 27, 2026
93669f9
ignore claude settings
meganrm May 21, 2026
e0b9f95
remove claude settings
meganrm May 21, 2026
606713f
Merge branch 'main' of https://github.com/simularium/binding-sim-edu …
meganrm May 21, 2026
8f18f1f
revert to main
meganrm May 21, 2026
a7fb9e1
fix bug where plots were getting added with only 0,0 as a value
meganrm May 22, 2026
0948846
add a Ki question
meganrm May 22, 2026
c905ea3
Potential fix for pull request finding
meganrm May 22, 2026
db366ee
change name of variable
meganrm May 22, 2026
b2a4888
have a help popup when disabled
meganrm May 26, 2026
1035c38
use satisfies
meganrm May 26, 2026
a1f8309
move into docs folder
meganrm May 26, 2026
46ed355
remove personal notification setting
meganrm May 26, 2026
0a92a61
remove whitespace
meganrm May 26, 2026
d7736e6
use createContext
meganrm May 26, 2026
f2f33f4
Merge branch 'fix/organize-state' of https://github.com/simularium/bi…
meganrm May 26, 2026
5bc7c9e
Potential fix for pull request finding
meganrm May 26, 2026
5f605df
make name more generic
meganrm May 27, 2026
fdfd995
change to div
meganrm May 28, 2026
7295030
fix zero causing slider issue, and zero being allowed
meganrm May 28, 2026
83dd501
separate form id from html id
meganrm May 28, 2026
c85505a
revert change
meganrm May 28, 2026
3a9647b
separate props
meganrm Jun 1, 2026
dc0166b
Merge branch 'main' of https://github.com/simularium/binding-sim-edu …
meganrm Jun 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/concentration-display/Concentration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ const Concentration: React.FC<AgentProps> = ({
} else {
let percentage: number | undefined = undefined;
const startingConcentration = concentration[agent];
if (startingConcentration !== undefined) {
if (
startingConcentration !== undefined &&
startingConcentration !== 0
) {
percentage =
(startingConcentration / maxConcentration) *
widthMinusMargins;
Expand Down
3 changes: 2 additions & 1 deletion src/components/quiz-questions/EquilibriumQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ const EquilibriumQuestion: React.FC = () => {
</>
}
failureMessage="Please try again. Look carefully at what is happening in each of the plots to help find the answer."
id="Equilibrium"
formID="equilibrium"
minimizedTitle="Equilibrium"
/>
</VisibilityControl>
);
Expand Down
5 changes: 3 additions & 2 deletions src/components/quiz-questions/KdQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const KdQuestion: React.FC<KdQuestionProps> = ({ kd, canAnswer }) => {
<Flex gap={8} align="baseline" style={{ maxWidth: 130 }}>
<InputNumber
aria-labelledby="kd question"
value={selectedAnswer || ""}
value={selectedAnswer ?? ""}
onChange={handleAnswerSelection}
placeholder="Type value..."
Comment on lines 105 to 109
/>
Expand All @@ -121,7 +121,8 @@ const KdQuestion: React.FC<KdQuestionProps> = ({ kd, canAnswer }) => {
successMessage={getSuccessMessage(selectedAnswer!)}
failureMessage="Visit the “Learn how to derive Kd” button above, then use the Equilibrium concentration plot to answer."
formState={formState}
id="Kd Value"
formID="kd-value"
minimizedTitle="Kd Value"
/>
</VisibilityControl>
);
Expand Down
5 changes: 3 additions & 2 deletions src/components/quiz-questions/KiQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const KiQuestion: React.FC<KiQuestionProps> = ({ canAnswer, ki }) => {
<Flex gap={8} align="baseline" style={{ maxWidth: 130 }}>
<InputNumber
aria-labelledby="ki-question"
value={selectedAnswer || ""}
value={selectedAnswer ?? ""}
onChange={handleAnswerSelection}
placeholder="Type value..."
Comment on lines 84 to 88
/>
Expand All @@ -101,7 +101,8 @@ const KiQuestion: React.FC<KiQuestionProps> = ({ canAnswer, ki }) => {
successMessage={getSuccessMessage(selectedAnswer!)}
failureMessage='Visit the "Learn how to derive Ki" button above, then use the Equilibrium concentration plot to answer.'
formState={formState}
id="Ki Value"
formID="ki-value"
minimizedTitle="Ki Value"
/>
</VisibilityControl>
);
Expand Down
16 changes: 9 additions & 7 deletions src/components/quiz-questions/QuizForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,29 @@ interface QuizFormProps {
formState: FormState;
successMessage: string | JSX.Element;
failureMessage: string;
id: string;
formID: string;
minimizedTitle: string;
}

const QuizForm: React.FC<QuizFormProps> = ({
title,
id,
formID,
formContent,
onSubmit,
formState,
successMessage,
failureMessage,
minimizedTitle,
}) => {
const { lastOpened, setLastOpened } = React.useContext(CenterPanelContext);
const [show, setShow] = React.useState(false);

const isFormMaximized = lastOpened === id;
const minimizedTitle = `Q:${id}`;
const isFormMaximized = lastOpened === formID;
const minimizedLabel = `Q:${minimizedTitle}`;

// open form on mount
useEffect(() => {
setLastOpened(id);
setLastOpened(formID);
setTimeout(() => {
setShow(true);
}, 1000);
Expand All @@ -47,7 +49,7 @@ const QuizForm: React.FC<QuizFormProps> = ({

const toggleFormVisibility = () => {
if (!isFormMaximized) {
setLastOpened(id);
setLastOpened(formID);
} else {
setLastOpened(null);
}
Expand All @@ -68,7 +70,7 @@ const QuizForm: React.FC<QuizFormProps> = ({
>
<div className={styles.header}>
<h3 className={styles.title}>
{isFormMaximized ? title : minimizedTitle}
{isFormMaximized ? title : minimizedLabel}
</h3>
<IconButton
onClick={toggleFormVisibility}
Expand Down
Loading