Gilead-BioStats / gsm.app

https://gilead-biostats.github.io/gsm.app/
Apache License 2.0
4 stars 2 forks source link

Bugfix: Participant Selection vs Non-Scatter Plots #213

Closed jonthegeek closed 1 month ago

jonthegeek commented 1 month ago

Expected Behavior

Clicking a participant in the Site Participants table should always take us to the Participant Details tab with a participant selected

Current Behavior

If I click a tab other than Scatter Plot, and select a site, and then select a Subject, it goes to Participant Details, but doesn't select that participant.

Possible Solution

Probably don't even TRY to fix this until we're done modularizing everything.

Steps to Reproduce

1. 2. 3. 4.

Context (Environment)

Possible Implementation

Additional Comments

jonthegeek commented 1 month ago

AHA! It looks like the issue is when the user is already selected. It doesn't do anything, because the user hasn't changed. Consider whether it should react as if it's newly selected, even if it's the already-selected user. Showing all inputs on all tabs might help with this from a UX standpoint.

jonthegeek commented 1 month ago

Er, ok, it's both. Sometimes it changes tabs but doesn't select a participant, sometimes it won't update because it's the same participant, sometimes it works fine. Work out which happens when.

samussiah commented 1 month ago

AHA! It looks like the issue is when the user is already selected. It doesn't do anything, because the user hasn't changed. Consider whether it should react as if it's newly selected, even if it's the already-selected user. Showing all inputs on all tabs might help with this from a UX standpoint.

I lean always show all inputs.

jonthegeek commented 1 month ago

I lean always show all inputs.

I want to do this anyway after using the app more during testing. It feels natural to click things (both in data viz and in menus) in order to do the deep-diving promised by the app; when the user selects a thing, I think it's natural in this app to assume they want to drill down on that thing.

jonthegeek commented 1 month ago

This also happens for the first user after we change the selected Metric. It's likely something in the JS we're using to pass the selection from the "Site Subjects" table to the input. I'll have to look closer, but I'm PRETTY sure that's the entirety of where the bug needs to be fixed.

jonthegeek commented 1 month ago

I can no longer replicate this. I suspect turning the "Participant" drop-down back on everywhere fixed it, but it could also have been from other hardening of the code.