Skip to content

Instantly share code, notes, and snippets.

View osalamon's full-sized avatar
🦉

Ondrej Salamon osalamon

🦉
View GitHub Profile
@osalamon
osalamon / interupted-work.md
Created June 9, 2025 09:03
BDT work - interupted WIP w/ Copilot

Step 1 - me aka osalamon - 1st question/specifiaction what I want to:

In each file/submodule in the folder view and all its subfolders there's a function with name ending by theses 3 characters _ui. These functions are intended to be compiled from R code into the HTML/JS code, and as such they are going to be front end, visible to the users of the app. Try to wrap each potentialy in GUI visible texts with the function i18n$translate(" ... visible text here ..."). Example (file honeybee_info.R):

From this code

tags$p(
          "Source code and scripts of the pDT can be found at ",
          tags$a(icon("github"), "https://github.com/BioDT", href = "https://github.com/BioDT", target = "_blank"),
 "."
@osalamon
osalamon / disease_app.R
Last active June 9, 2025 09:09
disease_app.R after changes
box::use(
shiny,
bslib,
htmltools[css],
waiter[Waiter],
leaflet,
leaflet.extras,
zip[zip],
jsonlite,
terra,
@osalamon
osalamon / honeybee_info.R
Created June 9, 2025 09:06
honeybee_info.R after changes
box::use(
shiny[moduleServer, NS, tagList, div, column, tags, fluidRow, icon, actionButton, observeEvent],
bslib[nav_select],
)
#' @export
honeybee_info_ui <- function(id, i18n) {
ns <- NS(id)
fluidRow(
class = "fluid-row",
@osalamon
osalamon / disease_info.R
Created June 9, 2025 13:33
disease_info.R - after previous changes
box::use(shiny[NS, column, tags, fluidRow, icon], )
#' @export
disease_info_ui <- function(id, i18n) {
ns <- NS(id)
fluidRow(
id = ns("welcome"),
class = "fluid-row",
column(
width = 6,