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

Last nuclide may not appear #51

Closed
Tracked by #833
KatieWoe opened this issue Aug 29, 2022 · 15 comments
Closed
Tracked by #833

Last nuclide may not appear #51

KatieWoe opened this issue Aug 29, 2022 · 15 comments
Assignees

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Aug 29, 2022

Test device
Samsung Chromebook and Dell
Operating System
ChromeOS and Win 11
Browser
Chrome
Problem description
For phetsims/qa#828
The last of a nuclide (either proton or neutron) may not appear before it is added to the nucleus. This happens if you are adding them individually or both at once from lower numbers. You can still add the last ones with the buttons, but not by dragging.

Visuals
237noneutron

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Build a Nucleus‬
URL: https://phet-dev.colorado.edu/html/build-a-nucleus/1.0.0-rc.8/phet/build-a-nucleus_all_phet.html
Version: 1.0.0-rc.8 2022-08-25 22:49:47 UTC
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Language: en-US
Window: 1280x649
Pixel Ratio: 1.5/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 30 uniform: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}

@KatieWoe KatieWoe added the type:bug Something isn't working label Aug 29, 2022
@KatieWoe KatieWoe changed the title Second to last nuclide may not appear Last nuclide may not appear Aug 29, 2022
@KatieWoe
Copy link
Contributor Author

Edit, should say last nuclide, not second to last.

@chrisklus
Copy link
Contributor

Thanks @KatieWoe! @Luisav1 and I had some trouble fixing this initially - the problem was occurring because the total count of each nucleon was blipping to the max when it was one smaller than the max because they were being double counted momentarily when being moved from the "particles on their way to the atom" array into the atom itself.

When discussing with @ariel-phet, we had the idea to track these counts just based on "what is out in the play area", instead of worrying about where the nucleons specifically were when out in the play area. Turns out, we were already setup to do this nicely with the particles array on the BANModel.

@KatieWoe could you please confirm on phettest?

@chrisklus chrisklus assigned KatieWoe and unassigned Luisav1 Aug 31, 2022
chrisklus added a commit that referenced this issue Aug 31, 2022
…ead of particle atom + side arrays counts, see #51
@KatieWoe
Copy link
Contributor Author

This still seems to be happening on phettest.

@KatieWoe KatieWoe assigned Luisav1 and unassigned KatieWoe Aug 31, 2022
@chrisklus
Copy link
Contributor

@KatieWoe it's working on phettest for me, do you mind checking if it's a caching problem? thanks!

@chrisklus chrisklus assigned chrisklus and unassigned Luisav1 Aug 31, 2022
@KatieWoe
Copy link
Contributor Author

It shouldn't be since I was in an incognito window, but I'll try one more time.

@KatieWoe
Copy link
Contributor Author

Ok, it seems ok now, not sure why it wasn't working before, maybe I didn't pull correctly. Sorry about that.

@chrisklus
Copy link
Contributor

For QA: Please close if this is fixed. Thanks!

@Nancy-Salpepi
Copy link

This looks good in 1.0.0-rc.10. Closing.

@Nancy-Salpepi
Copy link

Sorry I just saw this similar issue with mac + chrome/safari. After U-238 decays, the neutron disappears after a second but the arrow is still active and a neutron can be added.

neutron.disappears.mp4

@Luisav1
Copy link
Contributor

Luisav1 commented Sep 15, 2022

Thanks @Nancy-Salpepi! @chrisklus and I ideally fixed this in the above commit. Could you please check? We also added the "protons=x" and "neutrons=x" query parameters that you can use to get to U-238 quickly.

@Nancy-Salpepi
Copy link

@Luisav1 @chrisklus I no longer see the neutron randomly disappearing 🎉 and I love the new proton= neutron = query parameters! Two things:

  1. The decrease proton+neutron button size has shrunk

Screen Shot 2022-09-15 at 8 01 20 AM

  1. There is a delay for the proton at the bottom to disappear when any of the Pa isotopes undergoes beta minus decay (and in the case of Pa-237 it takes a while for the last neutron to appear).
protonneutron.mp4

@Luisav1
Copy link
Contributor

Luisav1 commented Sep 23, 2022

Thanks @Nancy-Salpepi! @chrisklus and I refactored the way the creator node visibility is checked, which fixed the above cases but also changed a lot of other code. We would appreciate thorough testing again on the creator node visibility. Thanks again!

@Luisav1 Luisav1 assigned Nancy-Salpepi and unassigned chrisklus and Luisav1 Sep 23, 2022
@Nancy-Salpepi
Copy link

@Luisav1 @chrisklus things are looking good to me. @KatieWoe is also going to take a look, so please hold off on closing.

@KatieWoe
Copy link
Contributor Author

I didn't see anything on my end :)

@chrisklus
Copy link
Contributor

Looks like this is good to close, thanks all!

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

No branches or pull requests

4 participants