Changes in script are not visible on app

Hi Team,

I have a demo module where i am making some changes to ui script and modules being called in ui script however the changes are not visible in browser when i run the app.

Kindly advise please.

It would be really useful to see a (reproducible) example of some of the code that's causing this problem, if that's possible.

If not, have you checked to make sure that any server logic that you expect to see in the UI will actually be called, causing the UI to refresh? Unless Shiny has a reason to refresh the UI, it wont. I.e. it's lazy.

Below is my code for ui script:

############################## CREATE THE SIDEBAR ##############################
sidebar <- dashboardSidebar(
sidebarMenu(
id = 'navpage',
menuItem("Intro", tabName = "intro", icon = icon("home")),
menuItem("Collect", tabName = "collect", icon = icon("compress")),
menuItem("Process", tabName = "data", icon = icon("database")),
menuItem("Trends", tabName = "insights", icon = icon("line-chart")),
menuItem("Optimise", tabName = "optimise", icon = icon("flask")),
menuItem(investigate_tab_name(), tabName = "investigate", icon = icon("search")),
menuItem("Operationalise", tabName = "operationalise", icon = icon("truck"))#,
# menuItem("Summary", tabName = "summary", icon = icon("bolt"))
),

div(style = "position: fixed; bottom: 0px; padding: 15px; margin:auto;",
img(src = 'tb_images/tb_logo.png', width = 200, style='padding-left: 26px;')
)
)

I have made changes to one of the tabs ("summary") being called in code above and following is an extract from tab_module_summary.R:

fluidPage(
titlePanel("Summary"),
fluidRow(
column(width=8,
box(title='Headline 1', width = NULL,
p("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula placerat enim, id ullamcorper felis blandit eu. Maecenas posuere lacinia lectus eget feugiat."),
p('Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam et odio nisi. Quisque ac fringilla nisl.'),
p('Fusce tempus ultricies leo, vitae efficitur ligula imperdiet sit amet. Sed non vestibulum felis.'),
p("Nulla convallis laoreet nisl, vestibulum rutrum elit molestie a. Cras cursus sit amet enim eget rutrum.")
),
tabBox(title='Headline 2', width = NULL, side = "right", selected = 'Video',
tabPanel('Instructions',
tags$ol(
tags$li('Cras vehicula volutpat ex et mattis.'),
tags$li('Praesent tincidunt velit et arcu fringilla, a pretium dolor interdum.'),
tags$li('Quisque tincidunt posuere ultricies. Cras aliquet pharetra rhoncus.'),
tags$li('Fusce porttitor placerat nunc, non consectetur libero accumsan non.'),
tags$li('Proin ultricies bibendum turpis vitae iaculis. Fusce malesuada diam non enim consectetur, et pretium metus scelerisque.'),
tags$li('Nullam at pulvinar mi, pellentesque congue ex.')
)
),
tabPanel('Video',
HTML('')
)
)
)
)
)

}

Hi again,

I'm still not clear as to exactly what the problem you're experiencing is. I can see in the ui code that your summary tab is commented out - is that why what you expect to see is not being displayed?

Is there any server logic that goes with the missing ui components that you don't see displayed, or is it all just ui code?

(Also, if you put three back ticks ``` before and after your code then it will be formatted nicely as code in your message)

Hi Jim,

Thank you for your kind assistance, i got that issue fixed. You were right about commented out part.

I am facing another issue now where i am not able to select rows from data table using input controls. i will be opening another thread on it but would be great if you can help with some sample code.

Regards

find below code which i am using where i want to select customer id from local_tbl_R and then display results from the table with only the selected customer id.

![image|635x500](upload://9ErnNiC1gzDbVNOuPn9mimLYqAx.png)tab_insights_ui <- function(id) {
  
  ns <- NS(id)
  fluidPage(
    titlePanel("Job Tracker Dataset"),
           fluidRow(
      column(width=6,
             selectInput("customer_id", label = "Pick a Value", choices = unique(local_tbl_R$customerid)),
             dataTableOutput(ns("job_data"))
      )
    ),
    br(),
    fluidRow(
      column(width = 8,
             actionLink(ns('data_activate'), 'Show data.'),
             conditionalPanel(sprintf("(input['%s'] %% 2) == 1", ns("data_activate")),
                              dataTableOutput(ns("job_data")))
            )
            )
  )
  
}


# Server function
tab_insights_server <- function(input, output, session)#, data_ready, historic_dataset, current_dataset, thresholds)
{
 
  output$job_data = DT::renderDataTable({
    datatable(local_tbl_R[local_tbl_R$customerid==input$customer_id,])
  })
}