keatonwilson / paleotidal_app

Shiny app for paleotidal modeling for Exeter + Bangor
1 stars 0 forks source link

Intra-module Reactivity Fixes for Input Module #24

Closed keatonwilson closed 1 year ago

keatonwilson commented 1 year ago

This PR focuses on fixing/demonstrating functionality of dynamically greying-out (disabling) and hiding portions of the input module depending on datatype selections (and a few other conditions). Generally, it covers the core WIP items that you identify in the server module @jessicaguo, but needs to be filled-out/finished for the rest of what I think you had in mind for dependencies.

Let me know if you have questions on the code - the core issues I worked through were:

  1. Making sure that any UI items defined the UI module were explicitly name-spaced - this includes wrapper divs to hide/show whole segments of content
  2. Dealing with shinyjs-module namespace weirdness when ui components are rendered in the server (though as a general rule, these should also be explicitly namespaced - see the code). I had to phone a friend for this one - his solution is a clever one though - using a conditional in the renderUI function to append (or not) the shinyjs-disabled class to the rendered object depending on the input.

Feel free to add commits and ping me for a review/re-review once you get the rest of the dependencies in that you envisioned!

This closes #19

keatonwilson commented 1 year ago

Hey @jessicaguo - thanks for this! I'll plan on reviewing today - was going to try and get to it last night but monsoon+power outage threw a wrench in my plans. 😀

I like the idea of the drop-down in the Data Summary Panel - we could probably ditch the info box that shows the data type and replace it with the drop-down.

keatonwilson commented 1 year ago

Looks great @jessicaguo - merging!