tsostarics / PitchMendR

Pitch Contour Editor Shiny App
MIT License
3 stars 0 forks source link

Modularize app #26

Closed tsostarics closed 4 months ago

tsostarics commented 10 months ago

Commit 03d5927 introduces a module to handle all the color management for the plot, along with the colour picker inputs. With this under my belt I think i can start modularizing the application, which should make it a lot easier to maintain moving forward. A few things off the top of my head that could be turned into modules include the buttons below the plot, the loadfile button, and the tools sidebar. I think this will make it easier to omit specific functionality from the eventual web app as well.

tsostarics commented 10 months ago

Update on this, the following modules now exist:

I'll probably move the diagnostics into their own module as well. A lot of the remaining things are either too small to bother moving them out or are really big and depend on multiple inputs, so it'll be a big push to modularize it. In the latter case it'll be worth the trouble, but it'll just take some time to work with so it might need to come after the proceedings is written.

tsostarics commented 7 months ago

Returning to this again, I'll be working on modularizing the following before implementing #58 :

tsostarics commented 7 months ago

the shinyJS handling with the dynamic UI dropdown components for the edited and unedited file selection boxes was annoying to debug so I'm going to leave those components as is, but otherwise the three modules are now available

tsostarics commented 5 months ago

I edited the plotting code a bit in 2dd94d0 so that the parts of the plot that don't change very frequently (colors, theme, etc) are offloaded to a reactive so the ggproto objects can be reused more easily instead of recreating them every time the plot renders. The code is a bit more readable and modular as a result, and could be moved to a separate module somewhat more easily now. There will be a lot of inputs passed to it though, but it will make it easier for me to edit the web app when i get around to it again.