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

add ability to see validated cases in app #62

Merged
merged 5 commits into from
Jun 20, 2019
Merged

Conversation

nathancday
Copy link
Contributor

A week later but here is my attempt for a fix #38, ready for critique.

Three points for clarification:

  1. I kept your suggestion of using the label 'Validated' (in input$type) but wanted to double check because the other case types use the same label as the case class, i.e. switch label to 'Succeeded'

  2. I am unsure how to test this and have not written any new tests yet. Happy to build some, just wanted to get feedback first.

  3. I put the JS code to disable buttons in www/toggle.js, is that the best location?

@lionel-
Copy link
Member

lionel- commented May 17, 2019

Hi Nathan, sorry for only getting back to you now. This looks like a great start!

It appears to work well for figures that were already validated before starting the Shiny app. Do you think it'd be easy to populate the Validated category dynamically, from the newly validated figures?

@nathancday
Copy link
Contributor Author

Adding newly confirmed plots feels doable. I'll take a swing at it and get back.

@nathancday
Copy link
Contributor Author

Hi Lionel, I took a look at this last night and it looks a little more complicated than I thought, but I think there is path forward.

Right now the function collect_cases() is called prior to initializing the Shiny app. This sets the list of cases and their status. As cases are validated, withdraw_cases() removes the case/cases from the list created by collect_cases() and updates file paths so the next time collect_cases()/the app is run the cases appear with their new status.

I think if the reactive values object cases is modified to be grouped by status instead of the all/active split, then withdraw_cases() (or a similar function) could be adjusted to move cases from one status group to another, as opposed to just removing them. That should provide the reactive updating behavior we were after.

Do you think this is reasonable?

@lionel-
Copy link
Member

lionel- commented Jun 4, 2019

This sounds reasonable. Perhaps another way is to maintain two lists of cases, one containing the validated cases and the other the pending cases. Would this be easier?

@nathancday
Copy link
Contributor Author

nathancday commented Jun 7, 2019

I think I was making this harder than it needed to be. Re-classing instead of removing cases, seems to work. What's your opinion of doing it like this?

@lionel-
Copy link
Member

lionel- commented Jun 11, 2019

Looks good! My only concern is that validating a case now switches the "Type:" dropdown menu to "Validated". Then you have to go back to "Mismatched" or "New" to continue validating other figures. I think the "Type" selection should not change.

@nathancday
Copy link
Contributor Author

Great, I will make that update.

@lionel-
Copy link
Member

lionel- commented Jun 20, 2019

That's awesome, thanks Nathan! @clauswilke will be happy :)

@clauswilke
Copy link

clauswilke commented Jun 20, 2019

Yes, I will! Thanks!

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.

Provide ability to show *all* cases in manage_cases()
3 participants