Skip to content
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

Add options for available symbols and coefficient scaling to Chemistry #69

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sjd210
Copy link
Contributor

@sjd210 sjd210 commented Sep 24, 2024

Adds option for coefficient scaling:

  • e.g. 2 H2 + O2 -> 2 H2O ===>>> H2 + 1/2 O2 -> H2O

and for disabling certain "available symbols" such as is done with trig functions for Symbolic Maths questions.

  • e.g. State Symbols controls (s), (l), (g), (aq)

Both of these are unavailable as options for Nuclear Physics questions.


Main PR here.

Dependant primarily on this API PR before it can be merged (but won't actually do anything without the new Chemistry Checker and its changes).

@sjd210 sjd210 marked this pull request as ready for review October 4, 2024 13:00
@sjd210 sjd210 changed the title Add options for availaible symbols and coefficient scaling to Chemistry Add options for available symbols and coefficient scaling to Chemistry Oct 4, 2024
<Input type="checkbox"
checked={doc[prop] ?? checkedIfUndefined ?? false}
disabled={disabled}
checked={(!disabled && doc[prop]) ?? checkedIfUndefined ?? false}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure you need this change. The useEffect should manage it for you!

Suggested change
checked={(!disabled && doc[prop]) ?? checkedIfUndefined ?? false}
checked={doc[prop] ?? checkedIfUndefined ?? false}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these changes seem reasonable and I'll add them in 😊. I think I'd been trying various things to stop useEffect from causing a re-render loop, which lead to some redundancies like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants