Giter Club home page Giter Club logo

parmesan's Introduction

parmesan

Quick notes TODO

Generar inputs from yaml Load yaml inputs in reactiveValues Update input changes in reactiveValues

yaml layout

Sugerir estructura de inputs de yaml para un shiny app hecha

fun: from table with input definitions to yaml

function to render yaml de inputs como elementos ui de shiny

validar opciones de una función (vis) para ver cuáles son los inputs recomendados

add theme to yaml

parmesan's People

Contributors

brazadas avatar camilaachuri avatar jpmarindiaz avatar lenafm avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

parmesan's Issues

Fix css of info tooltips

Chrome:
Tooltip overflows behind panel.
image

Firefox
Tooltip not workin. Label aligned right - should be left.
image

Dependences examples

How to make in yaml one o more dependences, before I can write:

agg:
  show: true
  depends_on: 
    ftype:
      one_of: [CatNum, Cat]
    viz:
      one_of:[bar, pie]
  input_info:
    input_type: selectizeInput

add possibility of adding informative tooltips in inputs

library(shinypanels)

styles <- "
.info-tool {
 display: flex;
}


.tooltip-inf {
 cursor: pointer;
 position: relative;
 margin-left: 3px;
}

.tooltip-inf .tooltiptext {
  visibility: hidden;
  width: 170px;
  higth: auto;
  background-color: #fafafa;
  color: #9FBD36;
  position: absolute;
  z-index: 9999;
  top: 0;
  padding: 1rem;
  border: 1px solid #ccc;
  font-weight: 400;
  letter-spacing: normal;
  font-size: 0.75rem;
}

.tooltip-inf:hover .tooltiptext {
  visibility: visible;
}
"

ui <- panelsPage( styles = styles,
                  panel(title = "example", 
                        head = NULL,
                        body = uiOutput('ejemplo')
                  )
)

server <- function(input, output, session) {
  
  output$ejemplo <- renderUI({
    div(
    HTML('<div class= "info-tool"> Plot type  <div class="tooltip-inf"> 
    <i class="fa fa-info-circle"></i><span class="tooltiptext">
    Its a tootip information </span</div></div></div>'),
    radioButtons('plot_type',  ' ', c("ggplot", "hgchmagic")))
})

}

shinyApp(ui, server)

In Yaml one option with:

library:
show: true
tooltip_info: Its a tootip information
input_type: radioButtons
input_params:
label: Library
choices:
highcharter:
- Interactive
ggplot:
- Static
inline: true

parameters reinitialize when language is changed (using shi18ny)

ALSO happens with everything that is translated in particular the data input from the user...

if the user of an app have altered the initial values of the parameters and then changes the language they are re-rendered and so the current configuration of the parameters is lost

this could be fixed i guess by passing to the update parameter (selected, value, ...) the current value of the input--- that is, all inputs would have to have the corresponding reactive called in the yaml file...
for example
name_column:
show: true
input_type: selectInput
input_params:
label: name_column
choices: data_input_names()
selected: input$name_column
update_param: selected

the only problem with this is that firtsly input$name_column is going to be null, so what we really want is something like
ifelse(is.null(input$name_column), "...", input$name_column)

Call inputs with package namespace

Add package namespace when input functions are called (especially when not from shiny).

This is because the golem package requires all functions within packages to be called with namespace.

text info tooltip should receive reactives

tooltip:
  show: true
  input_type: textInput
  input_params:
    label: tooltip
    value: 
  input_info:
    icon: info-circle
    text: tooltip_info()

tooltip_info() is ready as text and no the info into reactive

If section is NULL (render_section) its should render all the sections writes in "layout"

My layout .yaml

titles:
  label: Titles
  inputs:
    - title
    - subtitle
    - caption
colors:
  label: Colors
  inputs:
    - palette_colors

inputs:

---
title:
  show: true
  input_type: textInput
  input_params:
    label: Title
    value:
subtitle:
  show: true
  input_type: textInput
  input_params:
    label: Subtitle
    value:
caption:
  show: true
  input_type: textInput
  input_params:
    label: caption
    value: 
palette_colors:
  show: true
  input_type: colorPaletteInput
  input_params:
    label: palette_colors
    colors:
    - "#FA0A0A"
    - "#4354A3"
    - "#3298A0"
    - "#563208"
    - "#cd5490"
    - "#5689c4"

In R (server):

library(shinypanels)
library(parmesan)
library(shi18ny)
library(shinyinvoer)

ui <- panelsPage(
  panel(title = "Options",
        color = "chardonnay",
        width = 350,
        body = uiOutput("controls"))
)

server <- function(input, output, session) {

  parmesan <- parmesan_load("parmesan")
  
  output$controls <- renderUI({
  #  render_section(parmesan = parmesan)
    render_section("all_controls_here", parmesan = parmesan)
  })
  
}

Result:

imagen

colors section is ignored

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.