-
Notifications
You must be signed in to change notification settings - Fork 8
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
Theory-specific help #269
base: main
Are you sure you want to change the base?
Theory-specific help #269
Conversation
6d7a823
to
b70c493
Compare
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.
Thanks for getting this started, Hamidah! I've provided some initial feedback below. Let's discuss more in person.
@@ -45,6 +45,8 @@ export function TheorySelectorDialog( | |||
); | |||
} | |||
|
|||
export const [selectedTheory, setSelectedTheory] = createSignal<string | undefined>(undefined); |
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 don't know if creating a signal outside of a component, for example at the top level like here, will work. More importantly, we shouldn't need to create a new signal at all. The selected theory is already available from the LiveModelDocument
. See below.
<CircleHelp /> | ||
</IconButton> | ||
); | ||
if (selectedTheory() == null) { |
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.
Instead of using selectedTheory()
, create a TheoryHelpButton
that takes the theory ID (or undefined) as a prop. Then pass the theory as props.liveModel.theory()
from inside the ModelDocumentEditor
.
@@ -0,0 +1,46 @@ | |||
import { readdirSync, statSync, writeFileSync } from "node:fs"; | |||
import { join, resolve } from "node:path"; |
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 will not work because you're using Node-specific APIs, which are not available in the browser. That's why the CI is failing. We can discuss alternative approaches.
Theory-specific help
(PR is incomplete, routing isn't working)