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

Missing range input areas #206

Closed
jaelafield opened this issue Nov 14, 2024 · 3 comments
Closed

Missing range input areas #206

jaelafield opened this issue Nov 14, 2024 · 3 comments
Assignees
Labels
bug Something isn't working sc-critical

Comments

@jaelafield
Copy link
Contributor

All range input areas (except the last) are missing after pasting an input into the spec input area
Screenshot 2024-11-13 at 6 13 19 PM

If you type especially quickly or paste in just part of the input, sometimes areas other than the last are missing also.

@jaelafield
Copy link
Contributor Author

jaelafield commented Nov 14, 2024

@elmisback I've spent some time diagnosing this, but I need to move on to doing something else right this minute (and maybe won't get back to it tonight), but I thought I'd put my diagnosis out there in case that helps you knock it out if you'd like to right now.

This issue seems to be a state bug with this line/area
The setMySpecRanges that happens just below this is, of course, not instantaneous. So here when we iterate over the variables and add a new SpecRange for multiple new variables, mySpecRanges holds it's non-updated value on each iteration, so only the last addition actually sticks and gets reflected in the setMySpecRanges update.

@jaelafield jaelafield self-assigned this Nov 14, 2024
@jaelafield jaelafield added the bug Something isn't working label Nov 14, 2024
@jaelafield
Copy link
Contributor Author

Extra update, I doubt I'll be able to look at this before the RA meeting tomorrow either, I'm so sorry! But hopefully that ^^ is helpful.

@elmisback
Copy link
Collaborator

Thanks for isolating this to paste--basically the issue was that initialization isn't handled properly. I added a useEffect that initializes uninitialized ranges whenever new variables are detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sc-critical
Projects
None yet
Development

No branches or pull requests

2 participants