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

fix: screenplay not loaded when importing txt or clap #35

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

devniel
Copy link
Collaborator

@devniel devniel commented Aug 13, 2024

Hi,

The useEffect with getClap was not detecting changes, refactoring it to use meta is a simple fix but I think a better approach is to fill the proper store when setting timeline.setClap() to avoid complications with useEffect apart of avoiding additional renders. An even better approach could be to have a global store where to proxy calls to TimelineStore and ScriptEditorStore via a unique setClap, I think we could do that in the future.

@jbilcke-hf
Copy link
Owner

jbilcke-hf commented Aug 13, 2024

thank you! will merge you PR, we can do a bit of refactoring later!

for some context about why this changed:

until to a few days ago, the useTimeline() stored a copy of the .clap file,

but this was a bit redundant and confusing (ie. should we modify segments or clap.segments etc)
so I've removed this copy of .clap file and exposed all the content directly in the store (but meta is still a nested object, which can be a bit tricky to handle)

@jbilcke-hf jbilcke-hf merged commit 3635e59 into jbilcke-hf:main Aug 13, 2024
0 of 2 checks passed
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