jcrodriguez1989 / shinyWYSIWYG

ShinyApp: Shiny What You See Is What You Get (WYSIWYG) editor
28 stars 7 forks source link

Element positioning based on fluid grid system/layout? #1

Open rpodcast opened 5 years ago

rpodcast commented 5 years ago

I saw this app from your Shiny contest submission and I've been wanting something like this for a long time! I experimented with the application and I wondered if you have considered letting the user position elements based on the fluid grid system? For the apps I create, I often am not as concerned about absolute sizing of elements, but more about how I can lay them via fluidRow and column calls, customizing width and offsets as appropriate. I have more specific ideas about how this could be implemented, but wanted your take on this idea before going further.

jcrodriguez1989 commented 5 years ago

Hi Eric, thanks for your interest in ShinyWYSIWYG. Whenever I create a Shiny app I use the fluid grid system, mostly fluidRows and columns, as you said. So when I started developing the ShinyWYSIWYG tool I thought of using this system too. However, I could not think of an intuitive way to apply it. The algorithm I designed got the UI objects and assigned the least number of rows and columns to arrange them in the position they looked at the canvas creator. This produced lots of rows and columns, so the resulting code was not readable that easy, so for me, the gain was not worth it. I thought that giving an absolute positioned code to the Shiny beginner developer would be a good option to after tweak with fluid positioning. What would you suggest? Maybe adding rows and columns also by placing them at the canvas creator and then filling them with UI objects? I would appreciate getting your recommendations, ideas, code, etc?

Regards, Juan Cruz