diff --git a/NAMESPACE b/NAMESPACE
index db8e668..9b75571 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -23,6 +23,7 @@ importFrom(grDevices,
postscript,
svg
)
+importFrom(jsonlite,fromJSON)
importFrom(markdown,markdownToHTML)
importFrom(plotly,
layout,
diff --git a/NEWS.Rmd b/NEWS.Rmd
index 3001536..a730218 100644
--- a/NEWS.Rmd
+++ b/NEWS.Rmd
@@ -6,9 +6,10 @@ output: github_document
## RLumShiny 0.2.9 (Release date: `r Sys.Date()`)
-**This package version requires R >= 4.5!**
+* Add new dependency to `'jsonlite'`, which is already imported through `'plotly'`.
-* Add new dependency to `'jsonlite'`, which is already imported through `'plotly'`./
+* App `doserecovery`:
+ + Allow switching off the summary statistics.
* App `sarCWOSL` (changes in parts AI supported):
+ Improve user experience through an updated GUI
@@ -17,6 +18,315 @@ output: github_document
+ Support random seed fixing
+ Add interactive Abanico plot as combined output
+ Add dose table that also enables data manipulation
- + Various minor bug fixes.
+ + Various minor bug fixes.
+
+## RLumShiny 0.2.8 (Release date: 2026-08-24)
+
+**This package version requires R >= 4.5!**
+
+* Consolidated several pieces of code spread throughout the package into
+ internal helper functions.
+
+* App `abanico`:
+ + The computation of the y-axis limits no longer requires drawing the
+ entire plot in a separate window.
+ + Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+ + Fix crash occurring when the custom percentile range was a single-digit
+ value (#110).
+
+* App `doserecovery`:
+ + Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+
+* App `doseresponsecurve`:
+ + Add support to customise line type, width and colour of the dose-response
+ curve.
+ + Fix crash occurring when exporting a plot (#115).
+
+* App `filter`:
+ + Add support for interactive mode via the `plotly` package.
+
+* App `finitemixture:`
+ + Don't allow the minimum and maximum number of components to coincide, as
+ Luminescence doesn't support specifying only one component.
+
+* App `irsarRF:`
+ + Remove an error notification once the plot succeeds.
+ + Remove spurious recalculations at startup.
+
+* App `KDE`:
+ + Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+ + Allow specifying a subtitle.
+
+* App `radialplot`:
+ + Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+
+* App `RCarb`:
+ + Add support to run selected records only. This way single records can be
+ tested without modifying the table, i.e. deleting rows, which was the only
+ option in the past. Selected records are run through the
+ selection of rows in the table.
+ + Adaptation for changes in the underlying function in `'RCarb'` that will
+ considerably boost the start of the app (requires `'RCarb'` >= v0.1.8)
+
+* App `sarCWOSL`:
+ + Remove incorrect merging of the object imported.
+ + Set the maximum number of channels according to the input file, instead
+ of capping it arbitrarily at 1000 (#99)
+ + Add support for disabling the background integral subtraction.
+ + Leave the plot title empty so that the one from `analyse_SAR.CWOSL()` is
+ used by default.
+ + Allow controlling the drawing of the rug in the dose response curve plot.
+ + Add support for curve selection from the user interface.
+ + Add support for BIN/BINX files.
+ + Add support for choosing the fit mode (interpolation or extrapolation) and
+ fit method (`SSE`, `LIN`, `QDR`, `GOK`, `OTOR`, etc) for the dose response
+ curve.
+ + Add button to analyze all curves.
+ + Report the results obtained for each position selected in the Results and
+ Highlights tabs.
+ + Remove spurious recalculations at startup.
+
+
+## RLumShiny 0.2.7 (Release date: 2026-01-18)
+
+* This is a hotfix release to fix a problem with the way internal functions
+ are accessed when the package is loaded.
+
+* App `sarCWOSL`:
+ + Made the backgroud integral slider adjust according to the value of the
+ signal integral slider to avoid overlaps that would generate an error in
+ Luminescence.
+
+
+## RLumShiny 0.2.6 (Release date: 2025-12-18)
+
+**This package version requires R >= 4.4!**
+
+* New application to plot a dose-response curve for luminescence data.
+ Base function: `Luminescence::plot_DoseResponseCurve()`.
+ Keyword for `app_RLum()`: 'doseresponsecurve'.
+
+* New application to analyse CW-OSL curve data produced by a SUERC portable OSL
+ reader and produces a combined plot of OSL/IRSL signal intensities, OSL/IRSL
+ depletion ratios and the IRSL/OSL ratio.
+ Base function: `Luminescence::analyse_portableOSL()`.
+ Keyword for `app_RLum()`: 'portableOSL'.
+
+* New application to analyse a standard SAR protocol measurements introduced
+ by Murray and Wintle (2000) with CW-OSL curves.
+ Base function: `Luminescence::analyse_SAR.CWOSL()`.
+ Keyword for `app_RLum()`: 'sarCWOSL'.
+
+* Made `app_RLum()` ignore case differences when matching app names.
+
+* Made warnings and errors appear as notification in the app, not only in
+ the terminal (#40).
+
+
+## RLumShiny 0.2.5 (Release date: 2025-07-12)
+
+* New application to either estimate the number of grains on an aliquot or to
+ compute the packing density.
+ Base function: `Luminescence::calc_AliquotSize()`.
+ Keyword for `app_RLum()`: 'aliquotsize'.
+
+* New application to fit a k-component mixture to a De distribution with
+ differing known standard errors.
+ Base function: `Luminescence::calc_FiniteMixture()`.
+ Keyword for `app_RLum()`: 'finitemixture'.
+
+* New application to calculate the expected sample specific fraction of
+ saturation based on the model of Huntley (2006), using the approach as
+ implemented in Kars et al. (2008) or Guralnik et al. (2015).
+ Base function: `Luminescence::calc_Huntley2006()`.
+ Keyword for `app_RLum()`: 'huntley2006'.
+
+* New application to analyse IRSAR RF measurements on K-feldspar samples
+ performed using the protocol according to Erfurt et al. (2003) and beyond.
+ Base function: `Luminescence::analyse_IRSAR.RF()`.
+ Keyword for `app_RLum()`: 'irsarRF'.
+
+* New application to determine weighted non-linear least-squares estimates of
+ the component parameters of an LM-OSL curve (Bulur 1996) for a given number
+ of components.
+ Base function: `Luminescence::fit_LMCurve()`.
+ Keyword for `app_RLum()`: 'lmcurve'.
+
+* Added hints on file format and structure expected in each app (#45).
+
+* App `abanico`:
+ + Fix a crash when the summary is disabled
+ + Fix a crash when the 2σ bar color is set to none
+ + Improve the rounding in the sliders and the appearance of the legend
+
+* App `doserecovery`:
+ + Rework some user interface elements
+ + Add support for `given.dose = 0` to disable data normalization
+
+* App `histogram`:
+ + Improve the step of the x-axis range slider
+
+* App `radialplot`:
+ + Improve the appearance of the legend
+
+* App `surfaceexposure`:
+ + Rework user interface and add tooltips (#4)
+
+* App `transformCW`:
+ + Make the secondary axis label respect the scaling factor (#62)
+
+
+## RLumShiny 0.2.4 (Release date: 2024-03-21)
+
+**This package version requires R >= 4.3!**
+
+* Updated to reflect the changes that have occurred in the `Luminescence` and
+ `shiny` packages.
+
+* App `cosmicdose`:
+ + Google maps window replaced by Open Street Map window
+ + Fix crash when switching between different modes (#23)
+
+* App `doserecovery`:
+ + Fix partly non-working summary statistics (#2)
+ + New checkbox to control the showing of the legend
+
+* App `fastratio`:
+ + Fix the matching between point style and their descriptive labels
+
+* App `histogram`:
+ + Add support for breaks (#3)
+
+* Non-user visible changes to satisfy CRAN (anchor notes)
+
+
+## RLumShiny 0.2.3 (Release date: 2022-01-29)
+
+**This package version requires R >= 4.0!**
+
+* Updated `surfaceexposure` app now allows considering multiple mu values when
+ using the global fit functionality.
+
+* The app `filter` did not work anymore after changes in `'shiny'`; fixed.
+
+* The filter selector icons were deprecated, causing a warning in the terminal; fixed.
+
+* The app `RCarb` did not work anymore after changes in `'shiny'`; fixed.
+
+* The app `scalegamma` started with an error message, because one option for a chosen conversion factor was wrong; fixed.
+
+
+## RLumShiny 0.2.2 (Release date: 2019-01-11)
+
+* **PREVIEW**: New application that scales the gamma dose rate considering layer-to-layer
+ variations in soil radioactivity. Base function: `Luminescence::scale_GammaDose()`.
+ Keyword for `app_RLum()`: 'scalegamma'.
+
+ **NOTE**: This application will only start if the development version 0.9.x of the
+ R package `Luminescence` is installed as the function `scale_GammaDose()` is
+ still under development.
+
+* New application to support the new R package `RCarb`. Base function `RCarb::model_DoseRate()`.
+ Keyword for `app_RLum()`: 'RCarb'
+
+* Removed and updated deprecated links from the "About"-tab in all applications.
+
+
+## RLumShiny 0.2.1 (Release date: 2018-06-18)
+
+* New application that compares the OSL/IRSL stimulation power of measurements
+ performed on Freiberg Instruments lexsyg devices to check the stability
+ of the stimulation power (Contributed by Sebastian Kreutzer).
+ Keyword for `app_RLum()`: 'teststimulationpower'.
+
+* New application to calculate the fast ratio of CW-OSL curves after Durcan
+ and Duller (2011). Base function: `Luminescence::calc_FastRatio()`.
+ Keyword for `app_RLum()`: 'fastratio'.
+
+* New application to estimate the g-value from a table of Lx/Tx values with
+ corresponding waiting times since irradiation and to apply a fading
+ after Huntley & Lamothe (2001).
+ Base functions: `Luminescence::analyse_FadingMeasurement()`,
+ `Luminescence::calc_FadingCorr()`.
+ Keyword for `app_RLum()`: 'fading'.
+
+* New application to fit eq. 1 of Sohbati et al. (2012a) or eq. 12 of
+ Sohbati et al. (2012b) to OSL surface exposure data.
+ Base function: `Luminescence::fit_SurfaceExposure()`.
+ Keyword for `app_RLum()`: 'surfaceexposure'.
+
+* Output panel showing the R code to reproduce the plot/calculation is now
+ properly responsive and updates as soon as input widgets change.
+
+* Internal: server logic of most applications simplified.
+
+* Several minor bugfixes.
+
+## RLumShiny 0.2.0 (Release date: 2017-06-26)
+
+* Major overhaul of the data input panel for most applications. Uploaded text
+ files are now imported via 'data.table::fread()', which automatically
+ detects the delimiter and potential headers. Hence, all widgets related to
+ data import are no longer required and were removed (`#14`).
+
+* The input data can now be directly manipulated in the newly added spreadsheet(s)
+ in the data input panels. The spreadsheets also allow copy and pasting of data,
+ so uploading a file is no longer the only way to provide user data (`#12`).
+
+* New Dashboard addin added. The dashboard provides access to all available
+ applications in the package and can be accessed either (i) through the
+ addin dropdown menu in the RStudio IDE or (ii) by running 'app_RLum()' without
+ any keyword.
+
+* Implemented newest shiny feature (v0.14) to bookmark the current app state.
+ All apps now include a bookmark button, which returns a URL query string that
+ can be used to restore the app's state at any later time.
+
+* New application to plot filter combinations along with the optional
+ net transmission. Base function: `Luminescence::plot_FilterCombinations()`.
+ Keyword for `app_RLum()`: 'filter'. External contribution by Urs Tilmann
+ Wolpert (Justus-Liebig-University Giessen) and Sebastian Kreutzer
+ (Universite Bordeaux Montaigne).
+
+* New package dependencies: 'shinydashboard', 'rhandsontable', 'data.table', 'readxl'
+
+* transformCW-app:
+ + the plot now also shows the CW-OSL data curve
+ + improved error handling
+
+* Internal: R documentation re-written in Markdown using 'roxygen2 >=6.0.0'
+
+* Several minor bugfixes.
+
+## RLumShiny 0.1.1 (Release date: 2016-07-20)
+
+* New application to transform CW OSL curves (keyword 'transformCW') using the
+ functions 'CW2pHMi', 'CW2pLM', 'CW2pLMi' and 'CW2pPMi' of the R package
+ 'Luminescence'.
+
+* Removed UI elements that used now deprecated function arguments.
+
+* Added new UI elements for arguments added to functions after version 0.4.2 of
+ the 'Luminescence' package.
+
+* Removed the database feature in the abanico plot application.
+
+* Removed dependencies on 'digest' and 'RCurl'.
+
+* Removed all 'Exit' buttons.
+
+* Code output to reproduce the plots is now generated dynamically and should
+ be more reliable.
+
+* R Luminescence Package Team now properly mentioned as contributors.
+
+* Fixed many typos.
+
+## RLumShiny 0.1.0 (Release date: 2015-03-31)
+* Initial release.
diff --git a/NEWS.md b/NEWS.md
index 58bb759..e17a929 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,12 +1,14 @@
-## RLumShiny 0.2.9 (Release date: 2026-08-31)
-
-**This package version requires R \>= 4.5!**
+## RLumShiny 0.2.9 (Release date: 2026-10-13)
- Add new dependency to `'jsonlite'`, which is already imported through
- `'plotly'`./
+ `'plotly'`.
+
+- App `doserecovery`:
+
+ - Allow switching off the summary statistics.
- App `sarCWOSL` (changes in parts AI supported):
@@ -17,3 +19,342 @@
- Add interactive Abanico plot as combined output
- Add dose table that also enables data manipulation
- Various minor bug fixes.
+
+## RLumShiny 0.2.8 (Release date: 2026-08-24)
+
+**This package version requires R \>= 4.5!**
+
+- Consolidated several pieces of code spread throughout the package into
+ internal helper functions.
+
+- App `abanico`:
+
+ - The computation of the y-axis limits no longer requires drawing the
+ entire plot in a separate window.
+ - Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+ - Fix crash occurring when the custom percentile range was a
+ single-digit value (#110).
+
+- App `doserecovery`:
+
+ - Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+
+- App `doseresponsecurve`:
+
+ - Add support to customise line type, width and colour of the
+ dose-response curve.
+ - Fix crash occurring when exporting a plot (#115).
+
+- App `filter`:
+
+ - Add support for interactive mode via the `plotly` package.
+
+- App `finitemixture:`
+
+ - Don’t allow the minimum and maximum number of components to
+ coincide, as Luminescence doesn’t support specifying only one
+ component.
+
+- App `irsarRF:`
+
+ - Remove an error notification once the plot succeeds.
+ - Remove spurious recalculations at startup.
+
+- App `KDE`:
+
+ - Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+ - Allow specifying a subtitle.
+
+- App `radialplot`:
+
+ - Show the ui elements regarding the secondary dataset only when the
+ corresponding data is present.
+
+- App `RCarb`:
+
+ - Add support to run selected records only. This way single records
+ can be tested without modifying the table, i.e. deleting rows, which
+ was the only option in the past. Selected records are run through
+ the selection of rows in the table.
+ - Adaptation for changes in the underlying function in `'RCarb'` that
+ will considerably boost the start of the app (requires `'RCarb'` \>=
+ v0.1.8)
+
+- App `sarCWOSL`:
+
+ - Remove incorrect merging of the object imported.
+ - Set the maximum number of channels according to the input file,
+ instead of capping it arbitrarily at 1000 (#99)
+ - Add support for disabling the background integral subtraction.
+ - Leave the plot title empty so that the one from
+ `analyse_SAR.CWOSL()` is used by default.
+ - Allow controlling the drawing of the rug in the dose response curve
+ plot.
+ - Add support for curve selection from the user interface.
+ - Add support for BIN/BINX files.
+ - Add support for choosing the fit mode (interpolation or
+ extrapolation) and fit method (`SSE`, `LIN`, `QDR`, `GOK`, `OTOR`,
+ etc) for the dose response curve.
+ - Add button to analyze all curves.
+ - Report the results obtained for each position selected in the
+ Results and Highlights tabs.
+ - Remove spurious recalculations at startup.
+
+## RLumShiny 0.2.7 (Release date: 2026-01-18)
+
+- This is a hotfix release to fix a problem with the way internal
+ functions are accessed when the package is loaded.
+
+- App `sarCWOSL`:
+
+ - Made the backgroud integral slider adjust according to the value of
+ the signal integral slider to avoid overlaps that would generate an
+ error in Luminescence.
+
+## RLumShiny 0.2.6 (Release date: 2025-12-18)
+
+**This package version requires R \>= 4.4!**
+
+- New application to plot a dose-response curve for luminescence data.
+ Base function: `Luminescence::plot_DoseResponseCurve()`. Keyword for
+ `app_RLum()`: ‘doseresponsecurve’.
+
+- New application to analyse CW-OSL curve data produced by a SUERC
+ portable OSL reader and produces a combined plot of OSL/IRSL signal
+ intensities, OSL/IRSL depletion ratios and the IRSL/OSL ratio. Base
+ function: `Luminescence::analyse_portableOSL()`. Keyword for
+ `app_RLum()`: ‘portableOSL’.
+
+- New application to analyse a standard SAR protocol measurements
+ introduced by Murray and Wintle (2000) with CW-OSL curves. Base
+ function: `Luminescence::analyse_SAR.CWOSL()`. Keyword for
+ `app_RLum()`: ‘sarCWOSL’.
+
+- Made `app_RLum()` ignore case differences when matching app names.
+
+- Made warnings and errors appear as notification in the app, not only
+ in the terminal (#40).
+
+## RLumShiny 0.2.5 (Release date: 2025-07-12)
+
+- New application to either estimate the number of grains on an aliquot
+ or to compute the packing density. Base function:
+ `Luminescence::calc_AliquotSize()`. Keyword for `app_RLum()`:
+ ‘aliquotsize’.
+
+- New application to fit a k-component mixture to a De distribution with
+ differing known standard errors. Base function:
+ `Luminescence::calc_FiniteMixture()`. Keyword for `app_RLum()`:
+ ‘finitemixture’.
+
+- New application to calculate the expected sample specific fraction of
+ saturation based on the model of Huntley (2006), using the approach as
+ implemented in Kars et al. (2008) or Guralnik et al. (2015). Base
+ function: `Luminescence::calc_Huntley2006()`. Keyword for
+ `app_RLum()`: ‘huntley2006’.
+
+- New application to analyse IRSAR RF measurements on K-feldspar samples
+ performed using the protocol according to Erfurt et al. (2003) and
+ beyond. Base function: `Luminescence::analyse_IRSAR.RF()`. Keyword for
+ `app_RLum()`: ‘irsarRF’.
+
+- New application to determine weighted non-linear least-squares
+ estimates of the component parameters of an LM-OSL curve (Bulur 1996)
+ for a given number of components. Base function:
+ `Luminescence::fit_LMCurve()`. Keyword for `app_RLum()`: ‘lmcurve’.
+
+- Added hints on file format and structure expected in each app (#45).
+
+- App `abanico`:
+
+ - Fix a crash when the summary is disabled
+ - Fix a crash when the 2σ bar color is set to none
+ - Improve the rounding in the sliders and the appearance of the legend
+
+- App `doserecovery`:
+
+ - Rework some user interface elements
+ - Add support for `given.dose = 0` to disable data normalization
+
+- App `histogram`:
+
+ - Improve the step of the x-axis range slider
+
+- App `radialplot`:
+
+ - Improve the appearance of the legend
+
+- App `surfaceexposure`:
+
+ - Rework user interface and add tooltips (#4)
+
+- App `transformCW`:
+
+ - Make the secondary axis label respect the scaling factor (#62)
+
+## RLumShiny 0.2.4 (Release date: 2024-03-21)
+
+**This package version requires R \>= 4.3!**
+
+- Updated to reflect the changes that have occurred in the
+ `Luminescence` and `shiny` packages.
+
+- App `cosmicdose`:
+
+ - Google maps window replaced by Open Street Map window
+ - Fix crash when switching between different modes (#23)
+
+- App `doserecovery`:
+
+ - Fix partly non-working summary statistics (#2)
+ - New checkbox to control the showing of the legend
+
+- App `fastratio`:
+
+ - Fix the matching between point style and their descriptive labels
+
+- App `histogram`:
+
+ - Add support for breaks (#3)
+
+- Non-user visible changes to satisfy CRAN (anchor notes)
+
+## RLumShiny 0.2.3 (Release date: 2022-01-29)
+
+**This package version requires R \>= 4.0!**
+
+- Updated `surfaceexposure` app now allows considering multiple mu
+ values when using the global fit functionality.
+
+- The app `filter` did not work anymore after changes in `'shiny'`;
+ fixed.
+
+- The filter selector icons were deprecated, causing a warning in the
+ terminal; fixed.
+
+- The app `RCarb` did not work anymore after changes in `'shiny'`;
+ fixed.
+
+- The app `scalegamma` started with an error message, because one option
+ for a chosen conversion factor was wrong; fixed.
+
+## RLumShiny 0.2.2 (Release date: 2019-01-11)
+
+- **PREVIEW**: New application that scales the gamma dose rate
+ considering layer-to-layer variations in soil radioactivity. Base
+ function: `Luminescence::scale_GammaDose()`. Keyword for `app_RLum()`:
+ ‘scalegamma’.
+
+ **NOTE**: This application will only start if the development version
+ 0.9.x of the R package `Luminescence` is installed as the function
+ `scale_GammaDose()` is still under development.
+
+- New application to support the new R package `RCarb`. Base function
+ `RCarb::model_DoseRate()`. Keyword for `app_RLum()`: ‘RCarb’
+
+- Removed and updated deprecated links from the “About”-tab in all
+ applications.
+
+## RLumShiny 0.2.1 (Release date: 2018-06-18)
+
+- New application that compares the OSL/IRSL stimulation power of
+ measurements performed on Freiberg Instruments lexsyg devices to check
+ the stability of the stimulation power (Contributed by Sebastian
+ Kreutzer). Keyword for `app_RLum()`: ‘teststimulationpower’.
+
+- New application to calculate the fast ratio of CW-OSL curves after
+ Durcan and Duller (2011). Base function:
+ `Luminescence::calc_FastRatio()`. Keyword for `app_RLum()`:
+ ‘fastratio’.
+
+- New application to estimate the g-value from a table of Lx/Tx values
+ with corresponding waiting times since irradiation and to apply a
+ fading after Huntley & Lamothe (2001). Base functions:
+ `Luminescence::analyse_FadingMeasurement()`,
+ `Luminescence::calc_FadingCorr()`. Keyword for `app_RLum()`: ‘fading’.
+
+- New application to fit eq. 1 of Sohbati et al. (2012a) or eq. 12 of
+ Sohbati et al. (2012b) to OSL surface exposure data. Base function:
+ `Luminescence::fit_SurfaceExposure()`. Keyword for `app_RLum()`:
+ ‘surfaceexposure’.
+
+- Output panel showing the R code to reproduce the plot/calculation is
+ now properly responsive and updates as soon as input widgets change.
+
+- Internal: server logic of most applications simplified.
+
+- Several minor bugfixes.
+
+## RLumShiny 0.2.0 (Release date: 2017-06-26)
+
+- Major overhaul of the data input panel for most applications. Uploaded
+ text files are now imported via ‘data.table::fread()’, which
+ automatically detects the delimiter and potential headers. Hence, all
+ widgets related to data import are no longer required and were removed
+ (`#14`).
+
+- The input data can now be directly manipulated in the newly added
+ spreadsheet(s) in the data input panels. The spreadsheets also allow
+ copy and pasting of data, so uploading a file is no longer the only
+ way to provide user data (`#12`).
+
+- New Dashboard addin added. The dashboard provides access to all
+ available applications in the package and can be accessed either (i)
+ through the addin dropdown menu in the RStudio IDE or (ii) by running
+ ‘app_RLum()’ without any keyword.
+
+- Implemented newest shiny feature (v0.14) to bookmark the current app
+ state. All apps now include a bookmark button, which returns a URL
+ query string that can be used to restore the app’s state at any later
+ time.
+
+- New application to plot filter combinations along with the optional
+ net transmission. Base function:
+ `Luminescence::plot_FilterCombinations()`. Keyword for `app_RLum()`:
+ ‘filter’. External contribution by Urs Tilmann Wolpert
+ (Justus-Liebig-University Giessen) and Sebastian Kreutzer (Universite
+ Bordeaux Montaigne).
+
+- New package dependencies: ‘shinydashboard’, ‘rhandsontable’,
+ ‘data.table’, ‘readxl’
+
+- transformCW-app:
+
+ - the plot now also shows the CW-OSL data curve
+ - improved error handling
+
+- Internal: R documentation re-written in Markdown using ‘roxygen2
+ \>=6.0.0’
+
+- Several minor bugfixes.
+
+## RLumShiny 0.1.1 (Release date: 2016-07-20)
+
+- New application to transform CW OSL curves (keyword ‘transformCW’)
+ using the functions ‘CW2pHMi’, ‘CW2pLM’, ‘CW2pLMi’ and ‘CW2pPMi’ of
+ the R package ‘Luminescence’.
+
+- Removed UI elements that used now deprecated function arguments.
+
+- Added new UI elements for arguments added to functions after version
+ 0.4.2 of the ‘Luminescence’ package.
+
+- Removed the database feature in the abanico plot application.
+
+- Removed dependencies on ‘digest’ and ‘RCurl’.
+
+- Removed all ‘Exit’ buttons.
+
+- Code output to reproduce the plots is now generated dynamically and
+ should be more reliable.
+
+- R Luminescence Package Team now properly mentioned as contributors.
+
+- Fixed many typos.
+
+## RLumShiny 0.1.0 (Release date: 2015-03-31)
+
+- Initial release.
diff --git a/R/RLumShiny.R b/R/RLumShiny.R
index 78f1c6e..a03f109 100644
--- a/R/RLumShiny.R
+++ b/R/RLumShiny.R
@@ -21,6 +21,7 @@
#' @importFrom utils citation
#' @importFrom grDevices dev.off pdf postscript svg
#' @importFrom plotly plotlyOutput renderPlotly layout
+#' @importFrom jsonlite fromJSON
#'
#' @md
"_PACKAGE"
diff --git a/R/helpers-ui.R b/R/helpers-ui.R
index 3eb5d50..d483f80 100644
--- a/R/helpers-ui.R
+++ b/R/helpers-ui.R
@@ -1,3 +1,12 @@
+#' Internal helper to wrap a sidebar section in a panel with header
+#'
+#' @noRd
+section <- function(title, ...) {
+ div(class = "section-panel",
+ h5(title, class = "section-header"),
+ ...)
+}
+
#' Internal helper function to choose the symbol for points
#'
#' @noRd
diff --git a/R/module_aboutTab.R b/R/module_aboutTab.R
index 2c08125..cc5b352 100644
--- a/R/module_aboutTab.R
+++ b/R/module_aboutTab.R
@@ -1,22 +1,21 @@
aboutTab <- function(id, subdir) {
-
+
# Create a namespace function using the provided id
ns <- NS(id)
-
- tabPanel("About",
- hr(),
+
+ tabPanel("About",
+ section("Links",
div(align = "center",
# HTML code to include a .png file in the tab; the image file must be in
# a subfolder called "wwww"
img(src="RL_Logo.png", height = 100, width = 100, alt = "R.Lum"),
- p("Links:"),
+ br(),
a(href = "https://www.r-luminescence.org", "R.Luminescence project page", target="_blank"),
br(),hr(),
img(src='GitHub-Mark-32px.png', width='32px', height='32px'),
br(),
a(href = paste0("https://github.com/tzerk/RLumShiny/tree/master/inst/shiny/", subdir), "See the code on GitHub!", target="_blank")
)#/div
- )
-
-
+ )
+ )
}
diff --git a/R/module_exportTab.R b/R/module_exportTab.R
index 81074a2..392bb80 100644
--- a/R/module_exportTab.R
+++ b/R/module_exportTab.R
@@ -1,5 +1,4 @@
exportCodeHandler <- function(input, output, session, code) {
-
output$exportScript <- downloadHandler(
filename = function() { paste(input$filename, ".", "R", sep="") },
content = function(file) {
@@ -7,15 +6,13 @@ exportCodeHandler <- function(input, output, session, code) {
},#EO content =,
contentType = "text"
)#EndOf::dowmloadHandler()
-
}
exportPlotHandler <- function(input, output, session, fun, args) {
-
output$exportFile <- downloadHandler(
filename = function() { paste(input$filename, ".", input$fileformat, sep="") },
content = function(file) {
-
+
# determine desired fileformat and set arguments
if(input$fileformat == "pdf") {
pdf(file,
@@ -38,25 +35,25 @@ exportPlotHandler <- function(input, output, session, fun, args) {
paper = "special",
family = input$fontfamily)
}
-
- # plot
+
+ # plot
do.call(fun, args)
-
+
dev.off()
},#EO content =,
contentType = "image"
)#EndOf::dowmloadHandler()
}
+exportTab <- function(id, filename, callback = function() NULL) {
-exportTab <- function(id, filename) {
-
# Create a namespace function using the provided id
ns <- NS(id)
-
+
tabPanel("Export",
- radioButtons(inputId = ns("fileformat"),
- label = "Fileformat",
+ section("Plot export",
+ radioButtons(inputId = ns("fileformat"),
+ label = "Fileformat",
selected = "pdf",
choices = c("PDF (Portable Document Format)" = "pdf",
"SVG (Scalable Vector Graphics)" = "svg",
@@ -85,16 +82,21 @@ exportTab <- function(id, filename) {
"Courier" = "Courier",
"Bookman" = "Bookman",
"Palatino" = "Palatino")),
+
+ ## callback function
+ callback(),
+
tags$hr(),
- downloadButton(outputId = ns("exportFile"),
- label = "Download plot"),
-
- tags$hr(),
+ downloadButton(outputId = ns("exportFile"),
+ label = "Download plot")
+ ),
+
+ section("R script export",
helpText("Additionally, you can download a corresponding .R file that contains",
"a fully functional script to reproduce the plot in your R environment!"),
-
- downloadButton(outputId = ns("exportScript"),
+
+ downloadButton(outputId = ns("exportScript"),
label = "Download R script")
-
+ )
)
-}
\ No newline at end of file
+}
diff --git a/R/module_importTab.R b/R/module_importTab.R
index 1bffd43..6122131 100644
--- a/R/module_importTab.R
+++ b/R/module_importTab.R
@@ -4,10 +4,9 @@ importTab <- function(id, label, accept, callback = function() NULL) {
ns <- NS(id)
tabPanel("Import",
+ section("Data import",
- h5("Data import"),
-
- # file upload button
+ ## file upload button
fileInput(inputId = "file",
label = strong(label),
accept = accept),
@@ -15,4 +14,5 @@ importTab <- function(id, label, accept, callback = function() NULL) {
## callback function
callback()
)
+ )
}
diff --git a/inst/shiny/KDE/server.R b/inst/shiny/KDE/server.R
index 2f2c5ff..881d65d 100644
--- a/inst/shiny/KDE/server.R
+++ b/inst/shiny/KDE/server.R
@@ -145,7 +145,6 @@ function(input, output, session) {
main = input$main,
mtext = input$mtext,
values.cumulative = input$cumulative,
- na.rm = TRUE,
rug = input$rug,
boxplot = input$boxplot,
summary = summary,
diff --git a/inst/shiny/KDE/ui.R b/inst/shiny/KDE/ui.R
index bcaede7..a074d2f 100644
--- a/inst/shiny/KDE/ui.R
+++ b/inst/shiny/KDE/ui.R
@@ -6,13 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file1",
@@ -35,15 +34,16 @@ function(request) {
hr(),
actionButton(inputId = "refresh", label = "Refresh",
icon = icon("fas fa-sync"), title = "Redraw the plot.")
+ )
),##EndOf::Tab_1
# Tab 2: Statistical information
tabPanel("Statistics",
- div(align = "center", h5("Summary")),
+ RLumShiny:::section("Summary",
fluidRow(
column(width = 6,
checkboxInput(inputId = "summary",
- label = "Show summary",
+ label = "Show summary statistics",
value = FALSE),
title = "Add numerical output to the plot."
),
@@ -77,12 +77,13 @@ function(request) {
"Kurtosis" = "kurtosis",
"% in 2 sigma range" = "in.2s")),
title = "Statistical parameters to be shown in the summary.")
+ )
),##EndOf::Tab_2
# Tab 3: input that refer to the plot rather than the data
tabPanel("Plot",
- div(align = "center", h5("Title")),
+ RLumShiny:::section("Title",
textInput(inputId = "main",
label = "Title",
@@ -95,15 +96,17 @@ function(request) {
# inject sliderInput from Server.R
div(align = "left",
uiOutput(outputId = "bw"),
- title = "Bin width of the kernel density estimate."),
- br(),
- div(align = "center", h5("Scaling")),
+ title = "Bin width of the kernel density estimate.")
+ ),
+
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
- value = 1.0, step = 0.1),
+ value = 1.0, step = 0.1)
+ ),
- div(align = "center", h5("Further options")),
+ RLumShiny:::section("Further options",
div(align = "left",
checkboxInput(inputId = "cumulative",
label = "Show individual data",
@@ -123,11 +126,12 @@ function(request) {
value = TRUE))
)
)
+ )
),##EndOf::Tab_3
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = FALSE),
@@ -135,9 +139,10 @@ function(request) {
label = "Label x-axis",
value = "Equivalent dose [Gy]"),
# inject sliderInput from Server.R
- uiOutput(outputId = "xlim"),
- br(),
- div(align = "center", h5("Y-axis")),
+ uiOutput(outputId = "xlim")
+ ),
+
+ RLumShiny:::section("Y-axis",
fluidRow(
column(width = 6,
textInput(inputId = "ylab1",
@@ -150,11 +155,12 @@ function(request) {
value = "Cumulative frequency")
)
)
+ )
),##EndOf::Tab_4
# Tab 5: modify data point representation
tabPanel("Datapoints",
- div(align = "center", h5("Primary data set")),
+ RLumShiny:::section("Primary data set",
fluidRow(
column(width = 6,
selectInput(inputId = "color", label = "Datapoint color",
@@ -171,9 +177,10 @@ function(request) {
jscolorInput(inputId = "rgb",
label = "Choose a color"))
)
+ )
),
conditionalPanel(condition = "output.hasSecondaryData == true",
- div(align = "center", h5("Secondary data set")),
+ RLumShiny:::section("Secondary data set",
fluidRow(
column(width = 6,
selectInput(inputId = "color2", label = "Datapoint color",
@@ -193,6 +200,7 @@ function(request) {
label = "Choose a color"))
)
)
+ )
)
),##EndOf::Tab_5
@@ -203,7 +211,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside
of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/KDE/www/style.css b/inst/shiny/KDE/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/KDE/www/style.css
+++ b/inst/shiny/KDE/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/abanico/server.R b/inst/shiny/abanico/server.R
index c46720f..23ff802 100644
--- a/inst/shiny/abanico/server.R
+++ b/inst/shiny/abanico/server.R
@@ -347,7 +347,6 @@ function(input, output, session) {
grid.col = grid.col,
legend = legend,
legend.pos = legend.pos,
- na.rm = TRUE,
lwd = c(input$lwd, input$lwd2),
xlab = c(input$xlab1, input$xlab2),
ylab = input$ylab,
diff --git a/inst/shiny/abanico/ui.R b/inst/shiny/abanico/ui.R
index d2ce838..2ce8699 100644
--- a/inst/shiny/abanico/ui.R
+++ b/inst/shiny/abanico/ui.R
@@ -6,13 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file1",
label = strong("Primary data set"),
@@ -31,19 +30,20 @@ function(request) {
column(width = 6,
rHandsontableOutput(outputId = "table_in_secondary"))
),
- hr(),
+ br(),
actionButton(inputId = "refresh", label = "Refresh",
icon = icon("fas fa-sync"), title = "Redraw the plot.")
+ )
),##EndOf::Tab_1
# Tab 2: Statistical information
tabPanel("Statistics",
- div(align = "center", h5("Summary")),
+ RLumShiny:::section("Summary",
fluidRow(
column(width = 6,
checkboxInput(inputId = "summary",
- label = "Show summary",
+ label = "Show summary statistics",
value = TRUE),
title = "Add numerical output to the plot."
),
@@ -83,27 +83,29 @@ function(request) {
"Skewness" = "skewness",
"Kurtosis" = "kurtosis",
"% in 2 sigma range" = "in.2s")),
- title = "Statistical parameters to be shown in the summary."),
- br(),
- div(align = "center", h5("Datapoint labels")),
+ title = "Statistical parameters to be shown in the summary.")
+ ),
+
+ RLumShiny:::section("Datapoint labels",
div(align = "center", checkboxGroupInput(inputId = "statlabels", inline = TRUE,
label = NULL,
choices = c("Min" = "min",
"Max" = "max",
"Median" = "median")),
- title = "Additional labels of statistically important values in the plot."),
- br(),
- div(align = "center", h5("Error bars")),
+ title = "Additional labels of statistically important values in the plot.")
+ ),
+ RLumShiny:::section("Error bars",
div(align = "left",
checkboxInput(inputId = "errorbars",
label = "Show error bars",
value = FALSE),
title = "Show De-errors as error bars on De-points. Useful in combination with hidden y-axis and 2σ bar.")
+ )
),##EndOf::Tab_2
# Tab 3: input that refer to the plot rather than the data
tabPanel("Plot",
- div(align = "center", h5("Title")),
+ RLumShiny:::section("Title",
fluidRow(
column(width = 6,
textInput(inputId = "main",
@@ -115,8 +117,9 @@ function(request) {
label = "Subtitle",
value = "")
)
- ),
- div(align = "center", h5("Scaling")),
+ )),
+
+ RLumShiny:::section("Scaling",
# inject sliderInput from Server.R
div(id="bwKDE",
uiOutput(outputId = "bw"),
@@ -138,9 +141,9 @@ function(request) {
min = 0.5, max = 2,
value = 1.0, step = 0.1)
)
- ),
- br(),
- div(align = "center", h5("Centrality")),
+ )),
+
+ RLumShiny:::section("Centrality",
div(align = "left",
# centrality can either be a keyword or numerical input
selectInput(inputId = "centrality",
@@ -152,9 +155,10 @@ function(request) {
title = "User-defined central value, used for centering of data."),
conditionalPanel(condition = "input.centrality == 'custom'",
- uiOutput("centralityNumeric")),
+ uiOutput("centralityNumeric"))
+ ),
- div(align = "center", h5("Dispersion")),
+ RLumShiny:::section("Dispersion",
div(align = "left",
selectInput(inputId = "dispersion",
label = "Measure of dispersion",
@@ -172,45 +176,10 @@ function(request) {
min = 0,
max = 50,
step = 1)),
- title = "Symmetric percentile range with e.g. `5` indicating the range between 5 and 95 %"),
-
- div(align = "center", HTML("2σ bar
")),
-
- fluidRow(
- column(width = 6,
- checkboxInput(inputId = "customSigBar",
- label = HTML("Customise 2σ bar"),
- value = FALSE)
- ),
- column(width = 6,
- checkboxInput(inputId = "addBar",
- label = HTML("Second 2σ bar"),
- value = FALSE)
- )
+ title = "Symmetric percentile range with e.g. `5` indicating the range between 5 and 95 %")
),
-
- fluidRow(
- column(width = 6,
- conditionalPanel(condition = "input.customSigBar == true",
- numericInput(inputId = "sigmabar1",
- label = HTML("2σ bar 1"),
- min = 0, max = 100,
- value = 60)
- )
- ),
- column(width = 6,
- conditionalPanel(condition = "input.customSigBar == true",
- numericInput(inputId = "sigmabar2",
- label = HTML("2σ bar 2"),
- min = 0, max = 100,
- value = 100)
- )
- )
- ),
-
- div(align = "center", h5("Central line")),
-
+ RLumShiny:::section("Central line",
fluidRow(
column(width = 6,
RLumShiny:::lineWidthChooser(inputId = "lwd",
@@ -230,51 +199,80 @@ function(request) {
RLumShiny:::lineTypeChooser(inputId = "lty2",
selected = 2)
)
- ),
- div(align = "center", h5("Further options")),
+ )),
+
+ RLumShiny:::section("Legend",
fluidRow(
column(width = 6,
- checkboxInput(inputId = "rug",
- label = "Rug",
+ checkboxInput(inputId = "showlegend",
+ label = "Show legend",
value = FALSE),
- title = "Add a rug to the KDE part to indicate the location of individual values."
+ title = "Legend content to be added to the plot."
),
column(width = 6,
- checkboxInput(inputId = "rotate",
- label = "Rotate plot",
- value = FALSE),
- title = "Rotate the plot by 90°."
- ),
+ RLumShiny:::legendPositionChooser(inputId = "legend.pos",
+ selected = "bottomleft")
+ )
+ ),
+ fluidRow(
column(width = 6,
- checkboxInput(inputId = "boxplot",
- label = "Boxplot",
- value = FALSE),
- title = "Add a boxplot to the dispersion part."
+ textInput(inputId = "legendname",
+ label = "Primary data label",
+ value = "primary data")
),
- column(width = 6,
+ conditionalPanel(condition = "output.hasSecondaryData == true",
+ column(width = 6,
+ textInput(inputId = "legendname2",
+ label = "Secondary data label",
+ value = "secondary data")
+ )
+ )
+ )),
+
+ RLumShiny:::section("Additional elements",
+ fluidRow(
+ column(width = 4,
checkboxInput(inputId = "kde",
label = "KDE",
value = TRUE),
title = "Add a KDE plot to the dispersion part."
),
- column(width = 6,
+ column(width = 4,
checkboxInput(inputId = "histogram",
label = "Histogram",
- value = TRUE),
+ value = FALSE),
title = "Add a histogram to the dispersion part. Only meaningful when not more than one data set is plotted."
),
- column(width = 6,
+ column(width = 4,
+ checkboxInput(inputId = "rotate",
+ label = "Rotate plot",
+ value = FALSE),
+ title = "Rotate the plot by 90°."
+ ),
+ column(width = 4,
+ checkboxInput(inputId = "rug",
+ label = "Rug",
+ value = FALSE),
+ title = "Add a rug to the KDE part to indicate the location of individual values."
+ ),
+ column(width = 4,
+ checkboxInput(inputId = "boxplot",
+ label = "Boxplot",
+ value = FALSE),
+ title = "Add a boxplot to the dispersion part."
+ ),
+ column(width = 4,
checkboxInput(inputId = "dots",
label = "Dots",
- value = TRUE),
+ value = FALSE),
title = "Add a dot plot to the dispersion part. If number of dots exceeds space in the dispersion part, a square indicates this."
)
- ),
+ ))
),##EndOf::Tab_3
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
fluidRow(
column(width = 6,
textInput(inputId = "xlab1",
@@ -288,9 +286,10 @@ function(request) {
)
),
# inject sliderInput from Server.R
- uiOutput(outputId = "xlim"),
- br(),
- div(align = "center", h5("Y-axis")),
+ uiOutput(outputId = "xlim")
+ ),
+
+ RLumShiny:::section("Y-axis",
div(align = "left",
checkboxInput(inputId = "yaxis",
label = "Show y-axis",
@@ -299,9 +298,10 @@ function(request) {
textInput(inputId = "ylab",
label = "Label y-axis",
value = "Standardised estimate"),
- uiOutput("ylim"),
- br(),
- div(align = "center", h5("Z-axis")),
+ uiOutput("ylim")
+ ),
+
+ RLumShiny:::section("Z-axis",
div(align = "left",
checkboxInput(inputId = "logz",
label = "Logarithmic z-axis",
@@ -312,11 +312,12 @@ function(request) {
value = "Equivalent dose [Gy]"),
# inject sliderInput from Server.R
uiOutput(outputId = "zlim")
+ )
),##EndOf::Tab_4
# Tab 5: modify data point representation
tabPanel("Datapoints",
- div(align = "center", h5("Primary data set")),
+ RLumShiny:::section("Primary data set",
fluidRow(
column(width = 6,
RLumShiny:::pointSymbolChooser(inputId = "pch",
@@ -346,9 +347,14 @@ function(request) {
jscolorInput(inputId = "jscol1"))
)
),
+ selectInput(inputId = "filter.prim", label = "Filter values",
+ choices = "", multiple = TRUE, selected = ""),
+ actionButton(inputId = "exclude", label = "Apply filter",
+ icon = icon("fas fa-filter"))
+ ),
+
conditionalPanel(condition = "output.hasSecondaryData == true",
- br(),
- div(align = "center", h5("Secondary data set")),
+ RLumShiny:::section("Secondary data set",
fluidRow(
column(width = 6,
## DATA SET 2
@@ -379,13 +385,16 @@ function(request) {
HTML("Choose a color
"),
jscolorInput(inputId = "jscol2"))
)
+ ),
+
+ selectInput(inputId = "filter.sec", label = "Filter values",
+ choices = "", multiple = TRUE, selected = ""),
+ actionButton(inputId = "exclude", label = "Apply filter",
+ icon = icon("fas fa-filter"))
)
- )
- ),##EndOf::Tab_5
+ ),
- # Tab 6: add additional lines to the plot
- tabPanel("Lines",
- helpText("Here you can add additional lines."),
+ RLumShiny:::section("Additional lines",
# options for custom lines:
# 1 - z-value, 2 - color, 3 - label, 4 - line type
# only the options for the first line are shown
@@ -497,12 +506,13 @@ function(request) {
column(width = 6, HTML("Choose a color
"),jscolorInput(inputId = "colline8")),
column(width = 6, textInput("labline8","Label",value = ""))
)
+ )
)
- ),##EndOf::Tab_6
+ ),##EndOf::Tab_5
# Tab 7: modify the 2-sigma bar (radial plot), grid (both) and polygon (KDE)
tabPanel("Bars & Grid",
- div(align = "center", h5("Dispersion bar")),
+ RLumShiny:::section("Dispersion bar",
fluidRow(
column(width = 6,
selectInput(inputId = "polygon",
@@ -537,9 +547,10 @@ function(request) {
sliderInput(inputId = "alpha.polygon",
label = "Transparency",
min = 0, max = 100,
- step = 1, value = 66),
- br(),
- div(align = "center", HTML("2σ bar
")),
+ step = 1, value = 66)
+ ),
+
+ RLumShiny:::section(HTML("2σ bar"),
fluidRow(
column(width = 6,
selectInput(inputId = "bar", label = HTML("2σ bar color"),
@@ -573,8 +584,40 @@ function(request) {
label = "Transparency",
min = 0, max = 100,
step = 1, value = 66),
- br(),
- div(align = "center", h5("Grid")),
+
+ fluidRow(
+ column(width = 6,
+ checkboxInput(inputId = "customSigBar",
+ label = HTML("Customise 2σ bar"),
+ value = FALSE)
+ ),
+ column(width = 6,
+ checkboxInput(inputId = "addBar",
+ label = HTML("Second 2σ bar"),
+ value = FALSE)
+ )
+ ),
+
+ fluidRow(
+ column(width = 6,
+ conditionalPanel(condition = "input.customSigBar == true",
+ numericInput(inputId = "sigmabar1",
+ label = HTML("2σ bar 1"),
+ min = 0, max = 100,
+ value = 60)
+ )
+ ),
+ column(width = 6,
+ conditionalPanel(condition = "input.customSigBar == true",
+ numericInput(inputId = "sigmabar2",
+ label = HTML("2σ bar 2"),
+ min = 0, max = 100,
+ value = 100)
+ )
+ )
+ )),
+
+ RLumShiny:::section("Grid",
fluidRow(
column(width = 6,
selectInput(inputId = "grid", label = "Grid color",
@@ -593,79 +636,34 @@ function(request) {
sliderInput(inputId = "alpha.grid",
label = "Transparency",
min = 0, max = 100,
- step = 1, value = 50),
+ step = 1, value = 50)
- br(),
- div(align = "center", h5("Frame")),
+ ),
+
+ RLumShiny:::section("Frame",
selectInput(inputId = "frame", label = "Frame", selected = 1,
choices = list("No frame" = 0,
"Origin at {0,0}" = 1,
"Anchors at {0,-2}, {0,2}" = 2,
"Rectangle" = 3))
- ),##EndOf::Tab_7
-
- # Tab 8: add and customize legend
- tabPanel("Legend",
- div(align = "center", h5("Legend")),
- fluidRow(
- column(width = 6,
- checkboxInput(inputId = "showlegend",
- label = "Show legend",
- value = FALSE),
- title = "Legend content to be added to the plot."
- ),
- column(width = 6,
- RLumShiny:::legendPositionChooser(inputId = "legend.pos",
- selected = "bottomleft")
- )
- ),
- fluidRow(
- column(width = 6,
- textInput(inputId = "legendname",
- label = "Primary data label",
- value = "primary data")
- ),
- conditionalPanel(condition = "output.hasSecondaryData == true",
- column(width = 6,
- textInput(inputId = "legendname2",
- label = "Secondary data label",
- value = "secondary data")
- )
- )
)
- ),##EndOf::Tab_8
-
- # Tab 9: Filter data
- tabPanel("Filter",
- div(align = "center", h5("Primary data set")),
- selectInput(inputId = "filter.prim", label = "Choose values to exclude",
- choices = "", multiple = TRUE, selected = ""),
- div(align = "center", h5("Secondary data set")),
- selectInput(inputId = "filter.sec", label = "Choose values to exclude",
- choices = "", multiple = TRUE, selected = ""),
- actionButton(inputId = "exclude", label = "Exclude")
- ),##EndOf::Tab_9
-
- # Tab 10: Layout
- tabPanel("Layout",
- div(align = "center", h5("Layout")),
- div(id = "layout",
- selectInput(inputId = "layout",
- label = "Choose layout",
- selected = "default",
- choices = c("Default"="default",
- "Journal"="journal")),
- title = "Allows to modify the entire plot in a more sophisticated manner. Each element of the plot can be addressed and its properties can be defined. This includes font type, size and decoration, colours and sizes of all plot items. To infer the definition of a specific layout style cf. get_Layout() or type eg. for the layout type \"journal\" get_Layout(\"journal\"). A layout type can be modified by the user by assigning new values to the list object."
- ),
- ),
+ ),##EndOf::Tab_7
- RLumShiny:::exportTab("export", filename = "abanico plot"),
+ RLumShiny:::exportTab("export", filename = "abanico plot", callback = function() {
+ div(id = "layout",
+ selectInput(inputId = "layout",
+ label = "Choose layout",
+ selected = "default",
+ choices = c("Default" = "default",
+ "Journal" = "journal")),
+ title = "Apply a predefined layout.")
+ }),
RLumShiny:::aboutTab("about", "abanico")
)##EndOf::tabsetPanel
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/abanico/www/style.css b/inst/shiny/abanico/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/abanico/www/style.css
+++ b/inst/shiny/abanico/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/aliquotsize/ui.R b/inst/shiny/aliquotsize/ui.R
index fba7913..16a45a7 100644
--- a/inst/shiny/aliquotsize/ui.R
+++ b/inst/shiny/aliquotsize/ui.R
@@ -6,14 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
-
- # informational text
- div(align = "center", h5("Data input")),
+ RLumShiny:::section("Data input",
div(align = "left",
sliderInput(inputId = "grain_size",
label = "Range of grain sizes (microns)",
@@ -39,10 +37,10 @@ function(request) {
step = 0.1),
title = "Diameter of the sample carrier."
)
+ )
),
- # informational text
- div(align = "center", h5("Computation mode")),
+ RLumShiny:::section("Computation mode",
radioButtons(inputId = "mode",
label = "",
selected = "pd",
@@ -81,12 +79,12 @@ function(request) {
)
)
)
-
+ )
),##EndOf::Tab_1
# Tab 2: Plot
tabPanel("Plot",
- div(align = "center", h5("Main elements")),
+ RLumShiny:::section("Main elements",
textInput(inputId = "main",
label = "Title",
@@ -130,9 +128,10 @@ function(request) {
HTML("Choose a color
"),
jscolorInput(inputId = "jscol2"))
)
+ )
),
- div(align = "center", h5("Additional elements")),
+ RLumShiny:::section("Additional elements",
fluidRow(
column(width = 6,
checkboxInput(inputId = "rug",
@@ -156,14 +155,15 @@ function(request) {
label = "Show legend",
value = TRUE)
)
+ )
),
- br(),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_2
RLumShiny:::exportTab("export", filename = "aliquot size"),
@@ -172,7 +172,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css", ".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/aliquotsize/www/style.css b/inst/shiny/aliquotsize/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/aliquotsize/www/style.css
+++ b/inst/shiny/aliquotsize/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/convert/ui.R b/inst/shiny/convert/ui.R
index 080afc3..783c71a 100644
--- a/inst/shiny/convert/ui.R
+++ b/inst/shiny/convert/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -15,7 +15,7 @@ function(request) {
"application/octet-stream, .bin, .binx",
callback = function() {
list(
- div(align = "center", h5("Curve selection")),
+ RLumShiny:::section("Curve selection",
fluidRow(
column(width = 6,
uiOutput("positions")
@@ -24,10 +24,11 @@ function(request) {
column(width = 6,
uiOutput("recordTypes")
)
- ),
+ )),
- div(align = "center", h5("(De)select individual curves")),
+ RLumShiny:::section("(De)select individual curves",
checkboxGroupInput("curves", "Curves")
+ )
)
}),
@@ -43,7 +44,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/doserecovery/server.R b/inst/shiny/doserecovery/server.R
index e1c9aac..5f9f81f 100644
--- a/inst/shiny/doserecovery/server.R
+++ b/inst/shiny/doserecovery/server.R
@@ -164,7 +164,7 @@ function(input, output, session) {
object = values$data,
error.range = input$error,
given.dose = as.numeric(given.dose),
- summary = as.character(input$stats),
+ summary = if (input$summary) as.character(input$stats) else "",
summary.pos = input$sumpos,
boxplot = input$boxplot,
legend = legend,
diff --git a/inst/shiny/doserecovery/ui.R b/inst/shiny/doserecovery/ui.R
index 05486e9..444e7b2 100644
--- a/inst/shiny/doserecovery/ui.R
+++ b/inst/shiny/doserecovery/ui.R
@@ -2,14 +2,14 @@ function(request) {
fluidPage(
titlePanel("Dose Recovery", windowTitle = "RLumShiny - Dose Recovery"),
sidebarLayout(
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
# informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file1",
label = strong("Primary data set"),
@@ -32,15 +32,25 @@ function(request) {
actionButton(inputId = "refresh", label = "Refresh",
icon = icon("fas fa-sync"), title = "Redraw the plot.")
+ )
),##EndOf::Tab_1
# Tab 2: Statistical information
tabPanel("Statistics",
- div(align = "center", h5("Summary")),
- div(align = "left",
- RLumShiny:::summaryPositionChooser(inputId = "sumpos",
- selected = "topleft"),
- title = "Position of the statistical summary. The keyword \"Subtitle\" will only work if no plot subtitle is used."),
+ RLumShiny:::section("Summary",
+ fluidRow(
+ column(width = 6,
+ checkboxInput(inputId = "summary",
+ label = "Show summary statistics",
+ value = TRUE),
+ title = "Add numerical output to the plot."
+ ),
+ column(width = 6,
+ RLumShiny:::summaryPositionChooser(inputId = "sumpos",
+ selected = "topleft"),
+ title = "Position of the statistical summary. The keyword \"Subtitle\" will only work if no plot subtitle is used."
+ )
+ ),
div(align = "left",
checkboxGroupInput(inputId = "stats",
label = "Parameters",
@@ -59,18 +69,20 @@ function(request) {
"Skewness" = "skewness",
"Kurtosis" = "kurtosis")),
title = "Statistical parameters to be shown in the summary.")
+ )
),##EndOf::Tab_2
# Tab 3: input that refer to the plot rather than the data
tabPanel("DRT Details",
- div(align = "center", h5("Experimental details")),
+ RLumShiny:::section("Experimental details",
div(align = "left",
numericInput(inputId = "dose",
label = "Given dose (primary data set)",
value = 2800),
title = "Given dose used for the dose recovery test to normalise data. If set to 0, values are plotted without normalisation (might be useful for preheat plateau tests). Note: Unit has to be the same as from the input values (e.g., Seconds or Gray)."),
- numericInput(inputId = "dose2", label = "Given dose (secondary data set)", value = 3000),
- div(align = "center", h5("Preheat temperatures")),
+ numericInput(inputId = "dose2", label = "Given dose (secondary data set)", value = 3000)
+ ),
+ RLumShiny:::section("Preheat temperatures",
div(align = "left",
checkboxInput(inputId = "preheat",
label = "Group values by preheat temperature",
@@ -91,12 +103,13 @@ function(request) {
numericInput(inputId = "ph6", "PH Temperature #6", 280, min = 0),
numericInput(inputId = "ph7", "PH Temperature #7", 300, min = 0),
numericInput(inputId = "ph8", "PH Temperature #8", 320, min = 0)
+ )
)
),##EndOf::Tab_3
# Tab 3: input that refer to the plot rather than the data
tabPanel("Plot",
- div(align = "center", h5("Title")),
+ RLumShiny:::section("Title",
fluidRow(
column(width = 6,
textInput(inputId = "main",
@@ -108,43 +121,73 @@ function(request) {
label = "Subtitle",
value = "")
)
+ )
),
- div(align = "center", h5("Error range")),
+ RLumShiny:::section("Error range",
div(align = "left",
numericInput(inputId = "error",
label = "Symmetric error range (%)",
value = 10, min = 0, max = 100, step = 1),
- title = "Symmetric error range in percent that will be shown as dashed lines in the plot. It can be set to 0 to remove the error ranges."),
+ title = "Symmetric error range in percent that will be shown as dashed lines in the plot. It can be set to 0 to remove the error ranges.")
+ ),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ ),
+
+ RLumShiny:::section("Legend",
+ fluidRow(
+ column(width = 6,
+ checkboxInput(inputId = "showlegend",
+ label = "Show legend",
+ value = TRUE),
+ title = "Legend content to be added to the plot.")
+ ),
+ fluidRow(
+ column(width = 6,
+ textInput(inputId = "legendname",
+ label = "Primary data label",
+ value = "primary data")
+ ),
+ conditionalPanel(condition = "output.hasSecondaryData == true",
+ column(width = 6,
+ textInput(inputId = "legendname2",
+ label = "Secondary data label",
+ value = "secondary data")
+ )
+ )
+ ),
+ RLumShiny:::legendPositionChooser(inputId = "legend.pos",
+ selected = "bottomleft")
+ )
),##EndOf::Tab_3
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
textInput(inputId = "xlab",
label = "Label x-axis",
value = "# Aliquot"),
# inject xlim sliderInput from server.R
conditionalPanel(condition = 'input.preheat != true',
uiOutput(outputId = "xlim")
- ),
- br(),
- div(align = "center", h5("Y-axis")),
+ )),
+
+ RLumShiny:::section("Y-axis",
textInput(inputId = "ylab",
label = "Label y-axis",
value = "Normalised De"),
# inject ylim sliderInput from server.R
uiOutput(outputId = "ylim")
+ )
),##EndOf::Tab_4
tabPanel("Datapoints",
- div(align = "center", h5("Primary data set")),
+ RLumShiny:::section("Primary data set",
fluidRow(
column(width = 6,
RLumShiny:::pointSymbolChooser(inputId = "pch",
@@ -174,10 +217,9 @@ function(request) {
jscolorInput(inputId = "rgb",
label = "Choose a color"))
)
- ),
+ )),
conditionalPanel(condition = "output.hasSecondaryData == true",
- br(),
- div(align = "center", h5("Secondary data set")),
+ RLumShiny:::section("Secondary data set",
fluidRow(
column(width = 6,
## DATA SET 2
@@ -210,37 +252,10 @@ function(request) {
label = "Choose a color"))
)
)
+ )
)
),##EndOf::Tab_5
- # Tab xy: add and customize legend
- tabPanel("Legend",
- div(align = "center", h5("Legend")),
- fluidRow(
- column(width = 6,
- checkboxInput(inputId = "showlegend",
- label = "Show legend",
- value = TRUE),
- title = "Legend content to be added to the plot.")
- ),
- fluidRow(
- column(width = 6,
- textInput(inputId = "legendname",
- label = "Primary data label",
- value = "primary data")
- ),
- conditionalPanel(condition = "output.hasSecondaryData == true",
- column(width = 6,
- textInput(inputId = "legendname2",
- label = "Secondary data label",
- value = "secondary data")
- )
- )
- ),
- RLumShiny:::legendPositionChooser(inputId = "legend.pos",
- selected = "bottomleft")
- ),##EndOf::Tab_xy
-
RLumShiny:::exportTab("export", filename = "dose recovery"),
RLumShiny:::aboutTab("about", "doserecovery")
)
@@ -248,7 +263,7 @@ function(request) {
# Show a plot of the generated distribution
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/doserecovery/www/style.css b/inst/shiny/doserecovery/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/doserecovery/www/style.css
+++ b/inst/shiny/doserecovery/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/doseresponsecurve/ui.R b/inst/shiny/doseresponsecurve/ui.R
index 0eda04d..7449b3a 100644
--- a/inst/shiny/doseresponsecurve/ui.R
+++ b/inst/shiny/doseresponsecurve/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -24,7 +24,7 @@ function(request) {
), ## EndOf::Tab_1
tabPanel("Method",
- div(align = "center", h5("Fitting")),
+ RLumShiny:::section("Fitting",
radioButtons(inputId = "mode",
label = "Mode",
selected = "interpolation",
@@ -55,10 +55,11 @@ function(request) {
checkboxInput(inputId = "force_through_origin",
label = "Force through origin",
value = TRUE)
+ )
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "Dose Response Curve"),
@@ -79,10 +80,10 @@ function(request) {
label = "Density rug",
value = TRUE)
)
+ )
),
- br(),
- div(align = "center", h5("Curve")),
+ RLumShiny:::section("Curve",
fluidRow(
column(width = 6,
RLumShiny:::lineTypeChooser(inputId = "lty_drc",
@@ -110,18 +111,28 @@ function(request) {
HTML("Choose a colour
"),
jscolorInput(inputId = "jscol"))
)
+ )
),
- br(),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ ),
+
+ RLumShiny:::section("Legend",
+ checkboxInput(inputId = "showlegend",
+ label = "Show legend",
+ value = TRUE),
+
+ RLumShiny:::legendPositionChooser(inputId = "legend_pos",
+ selected = "topright")
+ )
),
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
textInput(inputId = "xlab",
label = "Label x-axis",
value = "Dose [s]"),
@@ -130,9 +141,9 @@ function(request) {
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = FALSE)
- ),
+ )),
- div(align = "center", h5("Y-axis")),
+ RLumShiny:::section("Y-axis",
textInput(inputId = "ylab",
label = "Label y-axis",
value = "Luminescence [a.u.]"),
@@ -141,17 +152,7 @@ function(request) {
checkboxInput(inputId = "logy",
label = "Logarithmic y-axis",
value = FALSE)
- )
- ),
-
- tabPanel("Legend",
- div(align = "center", h5("Legend")),
- checkboxInput(inputId = "showlegend",
- label = "Show legend",
- value = TRUE),
-
- RLumShiny:::legendPositionChooser(inputId = "legend_pos",
- selected = "topright"),
+ ))
),
RLumShiny:::exportTab("export", filename = "doseresponsecurve"),
@@ -160,7 +161,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/doseresponsecurve/www/style.css b/inst/shiny/doseresponsecurve/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/doseresponsecurve/www/style.css
+++ b/inst/shiny/doseresponsecurve/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/fading/ui.R b/inst/shiny/fading/ui.R
index eecb97e..93dd9cb 100644
--- a/inst/shiny/fading/ui.R
+++ b/inst/shiny/fading/ui.R
@@ -6,14 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
-
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file",
label = strong("Primary data set"),
@@ -28,15 +26,15 @@ function(request) {
which is why the number of Monte Carlo simulations is fixed to 100 and 1000,
respectively. Consider running the code given in the R code panels with a higher
number of MC iterations in a local R environment."
- )))
+ ))))
),##EndOf::Tab_1
+
# Tab 2: Fading correction
tabPanel("Age correction",
- div(align = "center", h5("Fading correction after Huntley & Lamothe (2001)")),
- hr(),
+ RLumShiny:::section("Fading correction after Huntley & Lamothe (2001)",
fluidRow(
column(width = 6,
- numericInput(inputId = "age_faded", HTML("Age (ka)", "(faded)"),
+ numericInput(inputId = "age_faded", HTML("Age (ka)", "(faded)"),
min = 0, step = 1, value = 10)),
column(width = 6,
numericInput(inputId = "age_error_faded", "Age error",
@@ -72,7 +70,7 @@ function(request) {
)
)
-
+ )
),
# Tab 4: modify axis parameters
@@ -83,7 +81,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/fading/www/style.css b/inst/shiny/fading/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/fading/www/style.css
+++ b/inst/shiny/fading/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/fastratio/ui.R b/inst/shiny/fastratio/ui.R
index d5d72ff..0d7f3b0 100644
--- a/inst/shiny/fastratio/ui.R
+++ b/inst/shiny/fastratio/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -25,12 +25,13 @@ function(request) {
), ## EndOf::Tab_1
tabPanel("Method",
- div(align = "center", h5("Input data preprocessing")),
- sliderInput(inputId = "deadchannels", "Dead channels", value = c(1, 1000), min = 1, max = 1000, step = 1,
- dragRange = TRUE),
-
- div(align = "center", h5("Simulation source")),
-
+ RLumShiny:::section("Input data preprocessing",
+ sliderInput(inputId = "deadchannels", "Dead channels", value = c(1, 1000), min = 1, max = 1000, step = 1,
+ dragRange = TRUE)
+ ),
+
+ RLumShiny:::section("Simulation source",
+
# Stimulation power and wavelength
fluidRow(
column(width = 6,
@@ -47,9 +48,9 @@ function(request) {
min = 1,
step = 1)
)
- ),
-
- div(align = "center", h5("Photoionisation cross-sections (cm^2)")),
+ )),
+
+ RLumShiny:::section("Photoionisation cross-sections (cm^2)",
# Photoionisation cross-sections
fluidRow(
column(width = 6,
@@ -90,8 +91,9 @@ function(request) {
)
)
)
- ),
- div(align = "center", h5("Channels")),
+ )),
+
+ RLumShiny:::section("Channels",
# L1
checkboxInput(inputId = "overrideL1", "Override channel for L1", value = FALSE),
conditionalPanel("input.overrideL1 == true",
@@ -106,10 +108,11 @@ function(request) {
checkboxInput(inputId = "overrideL3", "Override channels for L3", value = FALSE),
conditionalPanel("input.overrideL3 == true",
# TODO: call updateSlider in Server.R to update max range
- sliderInput(inputId = "L3", "Channel L3", value = c(400, 600), min = 1, max = 1000, step = 1,
- dragRange = TRUE)),
-
- div(align = "center", h5("% of signal remaining")),
+ sliderInput(inputId = "L3", "Channel L3", value = c(400, 600), min = 1, max = 1000, step = 1,
+ dragRange = TRUE))
+ ),
+
+ RLumShiny:::section("% of signal remaining",
fluidRow(
column(width = 6,
numericInput(inputId = "x", label = "...from the fast component", value = 1, min = 0.1, max = 100, step = 0.1)
@@ -118,25 +121,26 @@ function(request) {
numericInput(inputId = "x1", label = "...from the medium component", value = 0.1, min = 0.1, max = 100, step = 0.1)
)
)
+ )
),
-
+
tabPanel("Experimental",
- div(align = "center", h5("Curve fitting")),
-
+ RLumShiny:::section("Curve fitting",
+
checkboxInput(inputId = "fitCWsigma", label = "Calculate and use photoionisaton cross-sections",
value = FALSE),
checkboxInput(inputId = "fitCWcurve", label = "Derive fast ratio from fitted OSL curve",
- value = FALSE)
-
+ value = FALSE)
+ )
),
-
- tabPanel("Plot",
- div(align = "center", h5("Title")),
-
- textInput(inputId = "main",
- label = "Title",
+
+ tabPanel("Plot",
+ RLumShiny:::section("Plot elements",
+
+ textInput(inputId = "main",
+ label = "Title",
value = "Fast Ratio"),
-
+
radioButtons("type", "Type", selected = "b", inline = TRUE,
choices = c("Line" = "l",
"Points" = "p",
@@ -171,42 +175,45 @@ function(request) {
HTML("Choose a color
"),
jscolorInput(inputId = "jscol1"))
)
- ),
-
- br(),
- div(align = "center", h5("Scaling")),
- sliderInput(inputId = "cex",
+ )),
+
+
+ RLumShiny:::section("Scaling",
+ sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_3
-
+
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = FALSE),
textInput(inputId = "xlab",
label = "Label x-axis",
value = "t (s)"),
+ ),
+
# inject sliderInput from Server.R
- br(),
- div(align = "center", h5("Y-axis")),
+ RLumShiny:::section("Y-axis",
checkboxInput(inputId = "logy",
label = "Logarithmic y-axis",
value = FALSE),
textInput(inputId = "ylab",
label = "Label y-axis (left)",
value = "Signal (cts)")
+ )
),##EndOf::Tab_4
RLumShiny:::exportTab("export", filename = "fast ratio"),
RLumShiny:::aboutTab("about", "fastratio")
)##EndOf::tabsetPanel
),##EndOf::sidebarPanel
-
+
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/fastratio/www/style.css b/inst/shiny/fastratio/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/fastratio/www/style.css
+++ b/inst/shiny/fastratio/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/filter/server.R b/inst/shiny/filter/server.R
index 8d9736b..403daaa 100644
--- a/inst/shiny/filter/server.R
+++ b/inst/shiny/filter/server.R
@@ -55,7 +55,7 @@ shinyServer(function(input, output, session) {
show_net_transmission = input$net_transmission,
legend.text = input$filterInput$right,
interactive = TRUE,
- .shiny_server = TRUE)
+ .shiny = TRUE)
## translation of the standard plot with the
## help of ChatGPT5
diff --git a/inst/shiny/finitemixture/ui.R b/inst/shiny/finitemixture/ui.R
index 8a0f8bd..4045e59 100644
--- a/inst/shiny/finitemixture/ui.R
+++ b/inst/shiny/finitemixture/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -24,7 +24,7 @@ function(request) {
), ## EndOf::Tab_1
tabPanel("Method",
- div(align = "center", h5("Model parameters")),
+ RLumShiny:::section("Model parameters",
div(align = "left",
sliderInput(inputId = "sigmab",
HTML("Spread in De values (σb)"),
@@ -43,10 +43,11 @@ function(request) {
step = 1,
dragRange = FALSE),
title = "Number of components to be fitted.")
+ )
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "Finite Mixture Model"),
@@ -71,10 +72,10 @@ function(request) {
choices = c("Colour" = "colors",
"Grayscale" = "gray",
"None" = "none")
- ),
-
- div(align = "center", h5("Density plots")),
+ )
+ ),
+ RLumShiny:::section("Density plots",
div(align = "left",
checkboxInput(inputId = "pdf_weight",
label = "Use component proportions as weights",
@@ -85,20 +86,21 @@ function(request) {
checkboxInput(inputId = "pdf_sigma",
label = "Use common standard deviation",
value = TRUE),
- title = "The components normal distributions can be plotted using a common standard deviation (i.e. `sigmab`) or using the standard error of each component."),
+ title = "The components normal distributions can be plotted using a common standard deviation (i.e. `sigmab`) or using the standard error of each component.")
+ ),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_3
- tabPanel("Subplot labels",
-
- div(align = "center", h5("Density plots")),
+ tabPanel("Labels",
+ RLumShiny:::section("Density plots",
textInput(inputId = "main_densities",
label = "Densities label",
value = "Normal distributions"),
@@ -114,7 +116,7 @@ function(request) {
label = "Line plot label",
value = "Statistical criteria")
)
-
+ )
),##EndOf::Tab_4
RLumShiny:::exportTab("export", filename = "finitemixture"),
@@ -123,7 +125,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/finitemixture/www/style.css b/inst/shiny/finitemixture/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/finitemixture/www/style.css
+++ b/inst/shiny/finitemixture/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/histogram/server.R b/inst/shiny/histogram/server.R
index f32d666..3c7dbd3 100644
--- a/inst/shiny/histogram/server.R
+++ b/inst/shiny/histogram/server.R
@@ -70,7 +70,6 @@ function(input, output, session) {
values$args <- list(
data = values$data,
- na.rm = TRUE,
cex.global = as.numeric(input$cex),
pch = ifelse(input$pch == "custom", input$custompch, as.integer(input$pch)),
breaks = ifelse(input$breaks == "custom", input$breaks.num, input$breaks),
diff --git a/inst/shiny/histogram/ui.R b/inst/shiny/histogram/ui.R
index ee8500c..b51527e 100644
--- a/inst/shiny/histogram/ui.R
+++ b/inst/shiny/histogram/ui.R
@@ -2,14 +2,13 @@ function(request) {
fluidPage(
titlePanel("Histogram Plot", windowTitle = "RLumShiny - Histogram Plot"),
sidebarLayout(
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file1",
label = strong("Primary data set"),
@@ -25,14 +24,16 @@ function(request) {
hr(),
actionButton(inputId = "refresh", label = "Refresh",
icon = icon("fas fa-sync"), title = "Redraw the plot.")
+ )
),##EndOf::Tab_1
# Tab 2: Statistical information
tabPanel("Statistics",
+ RLumShiny:::section("Summary",
fluidRow(
column(width = 6,
checkboxInput(inputId = "summary",
- label = "Show summary",
+ label = "Show summary statistics",
value = FALSE),
title = "Add numerical output to the plot."
),
@@ -69,18 +70,20 @@ function(request) {
# "% in 2 sigma range" = "in.2s"
)
),
- title = "Statistical parameters to be shown in the summary"),
- div(align = "center", h5("Error bars")),
+ title = "Statistical parameters to be shown in the summary")
+ ),
+ RLumShiny:::section("Error bars",
div(align = "left",
checkboxInput(inputId = "errorBars",
label = "Show standard error points",
value = TRUE),
title = "Plot the standard error points over the histogram.")
+ )
),##EndOf::Tab_2
# Tab 1: Data input
tabPanel("Plot",
- div(align = "center", h5("Title")),
+ RLumShiny:::section("Title",
fluidRow(
column(width = 6,
textInput(inputId = "main",
@@ -92,8 +95,8 @@ function(request) {
label = "Subtitle",
value = "")
)
- ),
- div(align = "center", h5("Histogram bars")),
+ )),
+ RLumShiny:::section("Histogram bars",
fluidRow(
column(width = 6,
selectInput(inputId = "breaks", label = "Breaks",
@@ -136,8 +139,8 @@ function(request) {
label = "Bar transparency",
min = 0, max = 100,
step = 1, value = 66),
- br(),
- div(align = "center", h5("Normal curve")),
+ ),
+ RLumShiny:::section("Normal curve",
div(align = "left",
checkboxInput(inputId = "norm",
label = "Add normal curve",
@@ -160,14 +163,14 @@ function(request) {
jscolorInput(inputId = "normalRgb",
label = "Choose a color"))
)
- ),
- div(align = "center", h5("Scaling")),
+ )),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1),
- br(),
- div(align = "center", h5("Rugs")),
+ ),
+ RLumShiny:::section("Rug",
div(align = "left",
checkboxInput(inputId = "rugs",
label = "Add rugs",
@@ -190,17 +193,19 @@ function(request) {
label = "Choose a color"))
)
)
+ )
),##EndOf::Tab_9
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
textInput(inputId = "xlab",
label = "Label x-axis",
value = "Equivalent dose [Gy]"),
# inject sliderInput from Server.R
- uiOutput(outputId = "xlim"),
- div(align = "center", h5("Y-axis")),
+ uiOutput(outputId = "xlim")
+ ),
+ RLumShiny:::section("Y-axis",
fluidRow(
column(width = 6,
textInput(inputId = "ylab1",
@@ -213,11 +218,12 @@ function(request) {
value = "Error")
)
)
+ )
),##EndOf::Tab_4
# Tab 5: modify data point representation
tabPanel("Datapoints",
- div(align = "center", h5("Primary data set")),
+ RLumShiny:::section("Primary data set",
fluidRow(
column(width = 6,
RLumShiny:::pointSymbolChooser(inputId = "pch",
@@ -247,6 +253,7 @@ function(request) {
label = "Choose a color"))
)
)
+ )
),##EndOf::Tab_5
RLumShiny:::exportTab("export", filename = "histogram"),
RLumShiny:::aboutTab("about", "histogram")
@@ -255,7 +262,7 @@ function(request) {
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/histogram/www/style.css b/inst/shiny/histogram/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/histogram/www/style.css
+++ b/inst/shiny/histogram/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/huntley2006/ui.R b/inst/shiny/huntley2006/ui.R
index 2c8ffa5..960ce44 100644
--- a/inst/shiny/huntley2006/ui.R
+++ b/inst/shiny/huntley2006/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -25,7 +25,7 @@ function(request) {
tabPanel("Method",
withMathJax(),
- div(align = "center", h5("Rho prime")),
+ RLumShiny:::section("Rho prime",
fluidRow(
column(width = 6,
numericInput(inputId = "rhop",
@@ -41,9 +41,9 @@ function(request) {
min = 0,
step = 1e-8)
)
- ),
+ )),
- div(align = "center", h5("Dose rates")),
+ RLumShiny:::section("Dose rates",
fluidRow(
column(width = 6,
numericInput(inputId = "ddot",
@@ -77,10 +77,9 @@ function(request) {
min = 0,
step = 0.001)
)
- ),
-
- div(align = "center", h5("Model")),
+ )),
+ RLumShiny:::section("Model",
fluidRow(
column(width = 6,
radioButtons(inputId = "fit_method",
@@ -97,9 +96,9 @@ function(request) {
min = 2,
step = 500)
)
- ),
+ )),
- div(align = "center", h5("Dose response curves")),
+ RLumShiny:::section("Dose response curves",
fluidRow(
column(width = 6,
radioButtons(inputId = "mode",
@@ -118,20 +117,21 @@ function(request) {
label = "Force fit through origin",
value = FALSE)
)
- )
+ ))
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "Dose response curves"),
checkboxInput(inputId = "summary",
- label = "Show summary",
- value = TRUE),
+ label = "Show summary statistics",
+ value = TRUE)
+ ),
- div(align = "center", h5("Axes")),
+ RLumShiny:::section("Axes",
textInput(inputId = "xlab",
label = "Label x-axis",
value = "Dose [Gy]"),
@@ -142,13 +142,15 @@ function(request) {
checkboxInput(inputId = "normalise",
"Normalise y-axis",
- value = FALSE),
+ value = FALSE)
+ ),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_3
RLumShiny:::exportTab("export", filename = "huntley2006"),
@@ -157,7 +159,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/huntley2006/www/style.css b/inst/shiny/huntley2006/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/huntley2006/www/style.css
+++ b/inst/shiny/huntley2006/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/irsarRF/ui.R b/inst/shiny/irsarRF/ui.R
index 692b68f..0c046ab 100644
--- a/inst/shiny/irsarRF/ui.R
+++ b/inst/shiny/irsarRF/ui.R
@@ -6,12 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
fileInput(inputId = "nat",
label = strong("Natural curve"),
placeholder = "A CSV file with two columns (Time and Counts)",
@@ -30,11 +30,11 @@ function(request) {
rHandsontableOutput(outputId = "table_regenerated")
)
)
-
+ )
),##EndOf::Tab_1
tabPanel("Method",
- div(align = "center", h5("Method")),
+ RLumShiny:::section("Fitting",
selectInput(inputId = "method",
label = "Method",
selected = "SLIDE",
@@ -42,30 +42,31 @@ function(request) {
"VSLIDE",
"FIT",
"NONE")
- ),
+ )
+ ),
- br(),
- div(align = "center", h5("Channel ranges")),
+ RLumShiny:::section("Channel ranges",
div(align = "left",
uiOutput(outputId = "RF_nat"),
title = "Set minimum and maximum channel range for natural signal fitting and sliding."),
div(align = "left",
uiOutput(outputId = "RF_reg"),
- title = "Set minimum and maximum channel range for regenerated signal fitting and sliding."),
+ title = "Set minimum and maximum channel range for regenerated signal fitting and sliding.")
+ ),
- br(),
- div(align = "center", h5("Other options")),
+ RLumShiny:::section("Other options",
div(align = "left",
numericInput(inputId = "n_MC",
label = "Monte Carlo iterations",
value = 50, step = 10,
min = 0, max = 200),
title = "Number of Monte Carlo runs for the estimation of the start parameter (FIT) or of the error (SLIDE and VSLIDE). This value can be set to 0 to skip the MC runs.")
+ )
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "IR-RF"),
@@ -81,38 +82,44 @@ function(request) {
checkboxInput(inputId = "show_fit",
label = "Show fit",
value = FALSE),
- ),
+ )
+ ),
- div(align = "center", h5("Legend")),
+
+ RLumShiny:::section("Legend",
checkboxInput(inputId = "legend",
label = "Show legend",
value = TRUE),
RLumShiny:::legendPositionChooser(inputId = "legend_pos",
- selected = "top"),
+ selected = "top")
+ ),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_3
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = FALSE),
textInput(inputId = "xlab",
label = "Label x-axis",
- value = "Time [s]"),
+ value = "Time [s]")
+ ),
- div(align = "center", h5("Y-axis")),
+ RLumShiny:::section("Y-axis",
## inject ylab textInput from server.R
checkboxInput(inputId = "logy",
label = "Logarithmic y-axis",
value = FALSE),
uiOutput(outputId = "ylab")
+ )
),
RLumShiny:::exportTab("export", filename = "irsarRF"),
RLumShiny:::aboutTab("about", "irsarRF")
@@ -120,7 +127,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/irsarRF/www/style.css b/inst/shiny/irsarRF/www/style.css
index 09bcd81..12a5607 100644
--- a/inst/shiny/irsarRF/www/style.css
+++ b/inst/shiny/irsarRF/www/style.css
@@ -62,12 +62,60 @@ input[type="text"],input[type="number"],input[type="email"],input[type="url"],in
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px
-}
+ }
input,textarea,.uneditable-input{
width: auto;
-}
+ }
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/lmcurve/ui.R b/inst/shiny/lmcurve/ui.R
index 2a52424..c88391b 100644
--- a/inst/shiny/lmcurve/ui.R
+++ b/inst/shiny/lmcurve/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
# Tab 1: Data input
@@ -34,7 +34,7 @@ function(request) {
), ## EndOf::Tab_1
tabPanel("Method",
- div(align = "center", h5("Fitting")),
+ RLumShiny:::section("Fitting",
sliderInput(inputId = "n_components",
"Number of components",
value = 2,
@@ -49,9 +49,10 @@ function(request) {
"linear" = "linear",
"channel" = "channel",
"none" = "none")
- ),
+ )
+ ),
- div(align = "center", h5("Absolute photoionisation cross-section")),
+ RLumShiny:::section("Absolute photoionisation cross-section",
sliderInput(inputId = "LED_power",
"LED power (mW/cm²)",
min = 0, max = 100,
@@ -62,10 +63,11 @@ function(request) {
min = 100, max = 700,
value = 470,
step = 1)
+ )
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "LM Curve"),
@@ -81,11 +83,9 @@ function(request) {
label = "Plot component contribution",
value = TRUE)
)
- ),
-
- br(),
- div(align = "center", h5("Axes")),
+ )),
+ RLumShiny:::section("Axis",
radioButtons(inputId = "datatype",
label = "Input data type",
selected = "LM",
@@ -104,24 +104,23 @@ function(request) {
label = "Logarithmic y-axis",
value = FALSE)
)
- ),
+ )),
- br(),
- div(align = "center", h5("Legend")),
+ RLumShiny:::section("Legend",
checkboxInput(inputId = "showlegend",
label = "Show legend",
value = TRUE),
RLumShiny:::legendPositionChooser(inputId = "legend_pos",
- selected = "topright"),
+ selected = "topright")
+ ),
- br(),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
-
+ )
),##EndOf::Tab_3
RLumShiny:::exportTab("export", filename = "lmcurve"),
@@ -130,7 +129,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/lmcurve/www/style.css b/inst/shiny/lmcurve/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/lmcurve/www/style.css
+++ b/inst/shiny/lmcurve/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/portableOSL/ui.R b/inst/shiny/portableOSL/ui.R
index e4e14bf..0f74a41 100644
--- a/inst/shiny/portableOSL/ui.R
+++ b/inst/shiny/portableOSL/ui.R
@@ -6,7 +6,7 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Import",
RLumShiny:::importTab("import",
@@ -14,7 +14,7 @@ function(request) {
accept = "text/plain, .psl"),
tabPanel("Method",
- div(align = "center", h5("Input data preprocessing")),
+ RLumShiny:::section("Input data preprocessing",
sliderInput(inputId = "signal_integral",
"Signal integral",
value = c(1, 5),
@@ -32,10 +32,11 @@ function(request) {
checkboxInput(inputId = "normalise",
"Normalise",
value = FALSE)
+ )
),
tabPanel("Plot",
- div(align = "center", h5("Plot elements")),
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = "Portable OSL"),
@@ -90,9 +91,9 @@ function(request) {
jscolorInput(inputId = "jscol"))
)
)
- ),
+ )),
- div(align = "center", h5("Axis")),
+ RLumShiny:::section("Axis",
conditionalPanel(condition = "input.mode == 'surface'",
textInput(inputId = "xlab",
label = "Label x-axis",
@@ -108,14 +109,15 @@ function(request) {
checkboxInput(inputId = "legend",
label = "Show legend",
value = TRUE)
- ),
+ )
+ ),
- div(align = "center", h5("Scaling")),
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
-
+ )
),##EndOf::Tab_3
RLumShiny:::exportTab("export", filename = "portableOSL"),
RLumShiny:::aboutTab("about", "portableOSL")
@@ -123,7 +125,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/portableOSL/www/style.css b/inst/shiny/portableOSL/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/portableOSL/www/style.css
+++ b/inst/shiny/portableOSL/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/radialplot/server.R b/inst/shiny/radialplot/server.R
index 940ac8d..c6ca8bb 100644
--- a/inst/shiny/radialplot/server.R
+++ b/inst/shiny/radialplot/server.R
@@ -254,7 +254,6 @@ function(input, output, session) {
summary.pos = input$sumpos,
legend = legend,
legend.pos = legend.pos,
- na.rm = TRUE,
central.value = input$centValue,
centrality = input$centrality,
lwd = c(input$lwd, lwd2),
diff --git a/inst/shiny/radialplot/ui.R b/inst/shiny/radialplot/ui.R
index a50a120..5fe103c 100644
--- a/inst/shiny/radialplot/ui.R
+++ b/inst/shiny/radialplot/ui.R
@@ -6,13 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file1",
label = strong("Primary data set"),
@@ -34,15 +33,16 @@ function(request) {
hr(),
actionButton(inputId = "refresh", label = "Refresh",
icon = icon("fas fa-sync"), title = "Redraw the plot.")
+ )
),##EndOf::Tab_1
# Tab 2: Statistical information
tabPanel("Statistics",
- div(align = "center", h5("Summary")),
+ RLumShiny:::section("Summary",
fluidRow(
column(width = 6,
checkboxInput(inputId = "summary",
- label = "Show summary",
+ label = "Show summary statistics",
value = FALSE),
title = "Add numerical output to the plot."
),
@@ -71,20 +71,22 @@ function(request) {
"Skewness" = "skewness",
"Kurtosis" = "kurtosis")
),
- title = "Statistical parameters to be shown in the summary."),
- br(),
- div(align = "center", h5("Datapoint labels")),
+ title = "Statistical parameters to be shown in the summary.")
+ ),
+
+ RLumShiny:::section("Datapoint labels",
div(align = "center", checkboxGroupInput(inputId = "statlabels", inline = TRUE,
label = NULL,
choices = c("Min" = "min",
"Max" = "max",
"Median" = "median")),
title = "Additional labels of statistically important values in the plot.")
+ )
),##EndOf::Tab_2
# Tab 3: input that refer to the plot rather than the data
tabPanel("Plot",
- div(align = "center", h5("Title")),
+ RLumShiny:::section("Title",
fluidRow(
column(width = 6,
textInput(inputId = "main",
@@ -96,8 +98,9 @@ function(request) {
label = "Subtitle",
value = "")
)
- ),
- div(align = "center", h5("Scaling")),
+ )),
+
+ RLumShiny:::section("Scaling",
fluidRow(
column(width = 6,
# inject sliderInput from Server.R
@@ -119,11 +122,41 @@ function(request) {
"Weighted mean" = "mean.weighted",
"Weighted median" = "median.weighted")),
title = "Measure of centrality, used for the standardisation, centering the plot and drawing the central line.")
+ ),
+
+ RLumShiny:::section("Legend",
+ fluidRow(
+ column(width = 6,
+ checkboxInput(inputId = "showlegend",
+ label = "Show legend",
+ value = FALSE),
+ title = "Legend content to be added to the plot."
+ ),
+ column(width = 6,
+ RLumShiny:::legendPositionChooser(inputId = "legend.pos",
+ selected = "bottomleft")
+ )
+ ),
+ fluidRow(
+ column(width = 6,
+ textInput(inputId = "legendname",
+ label = "Primary data label",
+ value = "primary data")
+ ),
+ conditionalPanel(condition = "output.hasSecondaryData == true",
+ column(width = 6,
+ textInput(inputId = "legendname2",
+ label = "Secondary data label",
+ value = "secondary data")
+ )
+ )
+ )
+ )
),##EndOf::Tab_3
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
fluidRow(
column(width = 6,
textInput(inputId = "xlab1",
@@ -137,8 +170,10 @@ function(request) {
)
),
# inject sliderInput from Server.R
- uiOutput(outputId = "xlim"),
- div(align = "center", h5("Y-axis")),
+ uiOutput(outputId = "xlim")
+ ),
+
+ RLumShiny:::section("Y-axis",
div(align = "left",
checkboxInput(inputId = "yticks",
label = HTML("Show ±2σ label"),
@@ -146,8 +181,10 @@ function(request) {
title = "Hide y-axis labels."),
textInput(inputId = "ylab",
label = "Label y-axis",
- value = "Standardised estimate"),
- div(align = "center", h5("Z-axis")),
+ value = "Standardised estimate")
+ ),
+
+ RLumShiny:::section("Z-axis",
div(align = "left",
checkboxInput(inputId = "logz",
label = "Logarithmic z-axis",
@@ -163,11 +200,12 @@ function(request) {
min = 0, max = 3,
value = 4.5/5.5, step = 0.01, round = FALSE),
title = "User-defined plot area ratio (i.e. curvature of the z-axis). If omitted, the default value (4.5/5.5) is used and modified automatically to optimise the z-axis curvature. The parameter should be decreased when data points are plotted outside the z-axis or when the z-axis gets too elliptic.")
+ )
),##EndOf::Tab_4
# Tab 5: modify data point representation
tabPanel("Datapoints",
- div(align = "center", h5("Primary data set")),
+ RLumShiny:::section("Primary data set",
fluidRow(
column(width = 6,
RLumShiny:::pointSymbolChooser(inputId = "pch",
@@ -196,9 +234,9 @@ function(request) {
jscolorInput(inputId = "rgb",
label = "Choose a color"))
)
- ),
+ )),
conditionalPanel(condition = "output.hasSecondaryData == true",
- div(align = "center", h5("Secondary data set")),
+ RLumShiny:::section("Secondary data set",
fluidRow(
column(width = 6,
## DATA SET 2
@@ -230,12 +268,10 @@ function(request) {
label = "Choose a color"))
)
)
- )
- ),##EndOf::Tab_5
+ )
+ ),
- # Tab 6: add additional lines to the plot
- tabPanel("Lines",
- helpText("Here you can add additional lines."),
+ RLumShiny:::section("Additional lines",
# options for custom lines:
# 1 - z-value, 2 - color, 3 - label
# only the options for the first line are shown
@@ -310,13 +346,13 @@ function(request) {
column(width = 6, HTML("Choose a color
"),jscolorInput(inputId = "colline8")),
column(width = 6, textInput("labline8","Label",value = ""))
)
+ )
)
-
),##EndOf::Tab_6
# Tab 7: modify the 2-sigma bar (radial plot), grid (both) and polygon (KDE)
tabPanel("Bars & Grid",
- div(align = "center", h5("Central line")),
+ RLumShiny:::section("Central line",
fluidRow(
column(width = 6,
RLumShiny:::lineWidthChooser(inputId = "lwd",
@@ -336,8 +372,9 @@ function(request) {
RLumShiny:::lineTypeChooser(inputId = "lty2",
selected = 2)
)
- ),
- div(align = "center", HTML("2σ bar
")),
+ )),
+
+ RLumShiny:::section(HTML("2σ bar
"),
fluidRow(
column(width = 6,
selectInput(inputId = "bar", label = HTML("2σ bar color"),
@@ -370,8 +407,10 @@ function(request) {
sliderInput(inputId = "alpha.bar",
label = "Transparency",
min = 0, max = 100,
- step = 1, value = 66),
- div(align = "center", h5("Grid")),
+ step = 1, value = 66)
+ ),
+
+ RLumShiny:::section("Grid",
fluidRow(
column(width = 6,
selectInput("grid", "Grid color",
@@ -391,37 +430,8 @@ function(request) {
label = "Transparency",
min = 0, max = 100,
step = 1, value = 100)
- ),##EndOf::Tab_7
-
- tabPanel("Legend",
- div(align = "center", h5("Legend")),
- fluidRow(
- column(width = 6,
- checkboxInput(inputId = "showlegend",
- label = "Show legend",
- value = FALSE),
- title = "Legend content to be added to the plot."
- ),
- column(width = 6,
- RLumShiny:::legendPositionChooser(inputId = "legend.pos",
- selected = "bottomleft")
- )
- ),
- fluidRow(
- column(width = 6,
- textInput(inputId = "legendname",
- label = "Primary data label",
- value = "primary data")
- ),
- conditionalPanel(condition = "output.hasSecondaryData == true",
- column(width = 6,
- textInput(inputId = "legendname2",
- label = "Secondary data label",
- value = "secondary data")
- )
- )
)
- ),##EndOf::Tab_8
+ ),##EndOf::Tab_7
RLumShiny:::exportTab("export", filename = "radial plot"),
RLumShiny:::aboutTab("about", "radialplot")
@@ -429,7 +439,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/radialplot/www/style.css b/inst/shiny/radialplot/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/radialplot/www/style.css
+++ b/inst/shiny/radialplot/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/sarCWOSL/server.R b/inst/shiny/sarCWOSL/server.R
index 75255d7..c889639 100644
--- a/inst/shiny/sarCWOSL/server.R
+++ b/inst/shiny/sarCWOSL/server.R
@@ -714,11 +714,11 @@ function(input, output, session) {
row <- 1
curve <- values$data_primary[[pos]]@records[[row]]
- ## combine the two log checkboxes into plot_RLum.Data.Curve's log argument
+ ## combine the two log checkboxes into plot_RLum's log argument
log_axis <- paste0(ifelse(input$curve_logx, "x", ""),
ifelse(input$curve_logy, "y", ""))
- p <- Luminescence::plot_RLum.Data.Curve(
+ p <- Luminescence::plot_RLum(
object = curve,
log = log_axis,
norm = input$curve_norm,
@@ -1279,7 +1279,7 @@ function(input, output, session) {
}, options = list(pageLength = 10, scrollX = TRUE))
output$highlights <- DT::renderDT({
- getResultsTable(onlyHighlights = TRUE)
+ .getResultsTable(values$results, onlyHighlights = TRUE)
}, options = list(pageLength = 10))
## Abanico plot of the De distribution (De and De.Error columns),
diff --git a/inst/shiny/sarCWOSL/ui.R b/inst/shiny/sarCWOSL/ui.R
index 330c7e1..0da4f95 100644
--- a/inst/shiny/sarCWOSL/ui.R
+++ b/inst/shiny/sarCWOSL/ui.R
@@ -1,13 +1,6 @@
## UI.R
function(request) {
- ## helper to wrap a sidebar section in a bordered panel with its header on top
- section <- function(title, ...) {
- div(class = "section-panel",
- h5(title, class = "section-header"),
- ...)
- }
-
fluidPage(
titlePanel("SAR CWOSL", windowTitle = "RLumShiny - SAR CWOSL"),
sidebarLayout(
@@ -37,19 +30,19 @@ function(request) {
label = "Reset",
width = "100%")
),
- section("Aliquot selection",
+ RLumShiny:::section("Aliquot selection",
div(
uiOutput("positions"),
align = "center")
),
fluidRow(class = "import-row",
column(width = 6, class = "import-col",
- section("Record type selection",
+ RLumShiny:::section("Record type selection",
rhandsontable::rHandsontableOutput("recordTypes")
)
),
column(width = 6, class = "import-col",
- section("Batch processing",
+ RLumShiny:::section("Batch processing",
div(class = "batch-seed",
checkboxInput("fix_seed",
label = "Fix random seed",
@@ -110,7 +103,7 @@ function(request) {
}),
tabPanel("Method",
- section("Input data preprocessing",
+ RLumShiny:::section("Input data preprocessing",
sliderInput(inputId = "signal_integral",
"Signal integral",
value = c(1, 5),
@@ -168,7 +161,7 @@ function(request) {
step = 1)
),
- section("Rejection criteria",
+ RLumShiny:::section("Rejection criteria",
uiOutput("rejection_criteria"),
actionButton("apply_criteria",
icon = icon("check"),
@@ -176,7 +169,7 @@ function(request) {
),
conditionalPanel(condition = "input.fix_seed == true",
- section("Random seed",
+ RLumShiny:::section("Random seed",
numericInput("seed_value",
"Seed value",
value = 1,
@@ -187,7 +180,7 @@ function(request) {
),
tabPanel("Plot",
- section("Plot elements",
+ RLumShiny:::section("Plot elements",
textInput(inputId = "main",
label = "Title",
value = ""),
@@ -196,7 +189,7 @@ function(request) {
value = TRUE)
),
- section("Axes",
+ RLumShiny:::section("Axes",
fluidRow(
column(width = 6,
checkboxInput(inputId = "logx",
@@ -211,7 +204,7 @@ function(request) {
)
),
- section("Dose response curve",
+ RLumShiny:::section("Dose response curve",
fluidRow(
column(width = 6,
checkboxInput(inputId = "showlegend",
@@ -228,7 +221,7 @@ function(request) {
selected = "topright")
),
- section("Scaling",
+ RLumShiny:::section("Scaling",
sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
diff --git a/inst/shiny/sarCWOSL/www/style.css b/inst/shiny/sarCWOSL/www/style.css
index 49c59c9..875dc10 100644
--- a/inst/shiny/sarCWOSL/www/style.css
+++ b/inst/shiny/sarCWOSL/www/style.css
@@ -85,7 +85,6 @@ input,textarea,.uneditable-input{
border-radius: 6px;
padding: 10px;
margin-bottom: 15px;
- margin-right: 15px;
background-color: #fafafa;
}
@@ -93,7 +92,6 @@ input,textarea,.uneditable-input{
margin-top: 0;
margin-bottom: 10px;
padding-bottom: 5px;
- border-bottom: 1px solid #e0e0e0;
}
/* Collapsible sections: make the header look like the section
diff --git a/inst/shiny/scalegamma/ui.R b/inst/shiny/scalegamma/ui.R
index 6bbdce4..513d4c8 100644
--- a/inst/shiny/scalegamma/ui.R
+++ b/inst/shiny/scalegamma/ui.R
@@ -6,14 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
-
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file",
label = strong("Primary data set"),
@@ -25,12 +23,11 @@ function(request) {
tags$b("NOTE: "), "The uploaded file must have exactly 12 columns (see pre-loaded data set above). ",
"Only one value in 'Sample offset (cm)' allowed, which indicates the position of the sample in a layer, measured from the bottom of respective layer.",
"
Right-click on the table to add or remove rows. Copy-paste is supported.")
- ))
-
+ )))
),##EndOf::Tab_1
- tabPanel("Settings",
- tags$br(),
+ tabPanel("Method",
+ RLumShiny:::section("Settings",
selectInput(inputId = "frac_dose", "Fractional gamma dose table",
choices = c("Aitken 1985" = "Aitken1985")
),
@@ -41,7 +38,7 @@ function(request) {
"Guerin et al. 2011" = "Guerinetal2011",
"Adamiec & Aitken 1998" = "AdamiecAitken1998"
)
- )
+ ))
),
RLumShiny:::exportTab("export", filename = "scalegammadose"),
@@ -50,7 +47,7 @@ function(request) {
),##EndOf::sidebarPanel
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/scalegamma/www/style.css b/inst/shiny/scalegamma/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/scalegamma/www/style.css
+++ b/inst/shiny/scalegamma/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/surfaceexposure/ui.R b/inst/shiny/surfaceexposure/ui.R
index 1e557ff..a79148f 100644
--- a/inst/shiny/surfaceexposure/ui.R
+++ b/inst/shiny/surfaceexposure/ui.R
@@ -6,14 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
-
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file",
label = strong("Primary data set"),
@@ -26,11 +24,13 @@ function(request) {
"If the file contains three columns, it is automatically assumed that the third column ",
"is the error on the signal. The fourth column (Group) is only required for global fitting ",
"of multiple data sets.")
- ))
+ )))
),##EndOf::Tab_1
- tabPanel("Parameters",
+ tabPanel("Fitting",
+
+ RLumShiny:::section("Parameters",
fluidRow(
column(width = 4,
checkboxInput(inputId = "global_fit", "Global fit", TRUE)
@@ -94,10 +94,11 @@ function(request) {
),
title = "The charge detrapping rate."
)
- )
+ ))
),
tabPanel("Dose rate",
+ RLumShiny:::section("Dose rate",
checkboxInput("doserate", "Consider dose rate", FALSE),
helpText(HTML(paste(
"This will fit eq. 12 in Sohbati et al. (2012b) to the data. Note, however,",
@@ -114,13 +115,13 @@ function(request) {
),
hr(),
helpText(HTML(paste(tags$b("Reference:"), "Sohbati, R., Jain, M., Murray, A.S., 2012b. Surface exposure dating of non-terrestial bodies using optically stimulated luminescence: A new method. Icarus 221, 160-166.")))
+ )
),
-
- tabPanel("Plot",
- div(align = "center", h5("Title")),
-
- textInput(inputId = "main",
- label = "Title",
+
+ tabPanel("Plot",
+ RLumShiny:::section("Plot elements",
+ textInput(inputId = "main",
+ label = "Title",
value = "OSL Surface Exposure Dating"),
fluidRow(
@@ -142,8 +143,8 @@ function(request) {
selected = "red",
choices = list("Black" = "black",
"Grey" = "grey50",
- "Red" = "red", #"#b22222",
- "Green" = "#6E8B3D",
+ "Red" = "red", #"#b22222",
+ "Green" = "#6E8B3D",
"Blue" = "#428bca",
"Custom" = "custom"))
),
@@ -173,8 +174,8 @@ function(request) {
choices = list("Default" = "default",
"Black" = "black",
"Grey" = "grey50",
- "Red" = "#b22222",
- "Green" = "#6E8B3D",
+ "Red" = "#b22222",
+ "Green" = "#6E8B3D",
"Blue" = "#428bca",
"Custom" = "custom"))
),
@@ -186,7 +187,6 @@ function(request) {
)
),
- br(),
fluidRow(
column(width = 6,
checkboxInput(inputId = "legend",
@@ -199,49 +199,52 @@ function(request) {
value = TRUE),
title = "Show or hide error bars (only applies if errors are provided)."
)
- ),
- div(align = "center", h5("Scaling")),
- sliderInput(inputId = "cex",
+ )),
+
+ RLumShiny:::section("Scaling",
+ sliderInput(inputId = "cex",
label = "Scaling factor",
- min = 0.5, max = 2,
+ min = 0.5, max = 2,
value = 1.1, step = 0.1)
+ )
),##EndOf::Tab_3
-
+
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = FALSE),
- textInput(inputId = "xlab",
+ textInput(inputId = "xlab",
label = "Label x-axis",
value = "Depth (mm)"),
# inject sliderInput from Server.R
- sliderInput(inputId = "xlim", "X-axis limits", min = -15, max = 20,
- value = c(-0, 10), step = 0.1),
- br(),
- div(align = "center", h5("Y-axis")),
+ sliderInput(inputId = "xlim", "X-axis limits", min = -15, max = 20,
+ value = c(-0, 10), step = 0.1)
+ ),
+
+ RLumShiny:::section("Y-axis",
checkboxInput(inputId = "logy",
label = "Logarithmic y-axis",
value = FALSE),
- textInput(inputId = "ylab",
+ textInput(inputId = "ylab",
label = "Label y-axis (left)",
value = "OSL intensity (Ln/Tn)"),
sliderInput(inputId = "ylim", "Y-axis limits", min = -1, max = 2,
value = c(-0.1, 1.1), step = 0.1),
- br(),
checkboxInput(inputId = "coord_flip",
label = "Flip the coordinate system",
value = FALSE)
+ )
),##EndOf::Tab_4
RLumShiny:::exportTab("export", filename = "surfaceexposure"),
RLumShiny:::aboutTab("about", "surfaceExposure")
)##EndOf::tabsetPanel
),##EndOf::sidebarPanel
-
+
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/surfaceexposure/www/style.css b/inst/shiny/surfaceexposure/www/style.css
index d227112..12a5607 100644
--- a/inst/shiny/surfaceexposure/www/style.css
+++ b/inst/shiny/surfaceexposure/www/style.css
@@ -68,11 +68,54 @@ input,textarea,.uneditable-input{
width: auto;
}
-.help-block {
- margin-top: 13px;
- margin-bottom: 0px;
-}
-
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}
diff --git a/inst/shiny/transformCW/ui.R b/inst/shiny/transformCW/ui.R
index 36b5c77..4c9b0b5 100644
--- a/inst/shiny/transformCW/ui.R
+++ b/inst/shiny/transformCW/ui.R
@@ -6,14 +6,12 @@ function(request) {
# 2- width = 5 -> refers to twitters bootstrap grid system
# where the the maximum width is 12 that is to be shared between all
# elements
- sidebarPanel(width = 5,
+ sidebarPanel(width = 4,
# include a tabs in the input panel for easier navigation
tabsetPanel(id = "tabs", type = "pill", selected = "Data",
# Tab 1: Data input
tabPanel("Data",
-
- # informational text
- div(align = "center", h5("Data upload")),
+ RLumShiny:::section("Data upload",
# file upload button (data set 1)
fileInput(inputId = "file",
label = strong("Primary data set"),
@@ -26,12 +24,11 @@ function(request) {
),
column(width = 6)
)
-
+ )
),##EndOf::Tab_1
tabPanel("Method",
- hr(),
- div(align = "center", h5("Transformation settings")),
+ RLumShiny:::section("Transformation settings",
radioButtons("method", "Method", selected = "convert_CW2pHMi",
choices = c("Hyperbolic" = "convert_CW2pHMi",
"Linear" = "convert_CW2pLM",
@@ -42,13 +39,14 @@ function(request) {
numericInput("delta", "Delta", value = 1, min = 0)),
conditionalPanel(condition = "input.method == 'CW2pLMi' || input.method == 'CW2pPMi'",
numericInput("p", "P", value = 1, min = 0))
+ )
),
-
- tabPanel("Plot",
- div(align = "center", h5("Title")),
-
- textInput(inputId = "main",
- label = "Title",
+
+ tabPanel("Plot",
+ RLumShiny:::section("Plot elements",
+
+ textInput(inputId = "main",
+ label = "Title",
value = "CW Curve Transfomation"),
radioButtons("type", "Type", selected = "l", inline = TRUE,
@@ -90,26 +88,30 @@ function(request) {
br(),
checkboxInput(inputId = "showCW",
label = "Show CW-OSL curve",
- value = TRUE),
- div(align = "center", h5("Scaling")),
- sliderInput(inputId = "cex",
+ value = TRUE)
+ ),
+
+ RLumShiny:::section("Scaling",
+ sliderInput(inputId = "cex",
label = "Scaling factor",
min = 0.5, max = 2,
value = 1.0, step = 0.1)
+ )
),##EndOf::Tab_3
-
+
# Tab 4: modify axis parameters
tabPanel("Axis",
- div(align = "center", h5("X-axis")),
+ RLumShiny:::section("X-axis",
checkboxInput(inputId = "logx",
label = "Logarithmic x-axis",
value = TRUE),
textInput(inputId = "xlab",
label = "Label x-axis",
value = "t [s]"),
+ ),
+
# inject sliderInput from Server.R
- br(),
- div(align = "center", h5("Y-axis")),
+ RLumShiny:::section("Y-axis",
checkboxInput(inputId = "logy",
label = "Logarithmic y-axis",
value = FALSE),
@@ -119,15 +121,16 @@ function(request) {
textInput(inputId = "ylab2",
label = "Label y-axis (right)",
value = "CW-OSL [cts/s]")
+ )
),##EndOf::Tab_4
-
+
RLumShiny:::exportTab("export", filename = "transformCW"),
RLumShiny:::aboutTab("about", "transformCW")
)##EndOf::tabsetPanel
),##EndOf::sidebarPanel
-
+
# 3 - output panel
- mainPanel(width = 7,
+ mainPanel(width = 8,
# insert css code inside of the generated HTML file:
# allow open dropdown menus to reach over the container
tags$head(tags$style(type="text/css",".tab-content {overflow: visible;}")),
diff --git a/inst/shiny/transformCW/www/style.css b/inst/shiny/transformCW/www/style.css
index 62aa3f9..12a5607 100644
--- a/inst/shiny/transformCW/www/style.css
+++ b/inst/shiny/transformCW/www/style.css
@@ -71,3 +71,51 @@ input,textarea,.uneditable-input{
#shiny-notification-panel {
width: 800px
}
+
+/* Main output panel: leave a little breathing room on the right of the
+ main window and the table below it, matching the gutter spacing used on
+ the left where the sidebar sits */
+.col-sm-8 {
+ padding-right: 15px;
+}
+
+/* Section panels used in the sidebar: header on top, border around the section */
+.section-panel {
+ border: 1px solid #d3d3d3;
+ border-radius: 6px;
+ padding: 10px;
+ margin-bottom: 15px;
+ background-color: #fafafa;
+}
+
+.section-panel > .section-header {
+ margin-top: 0;
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+}
+
+/* Collapsible sections: make the header look like the section
+ header (blue like h5) and clickable */
+.section-panel > summary.section-header {
+ display: list-item;
+ cursor: pointer;
+ color: #428bca;
+ font-size: 14px;
+ font-weight: bold;
+ user-select: none;
+}
+
+/* Import tab: the two side-by-side panels (aliquot/record selection and
+ batch processing) stretch to an equal height */
+#tabs .import-row {
+ display: flex;
+}
+#tabs .import-row > .import-col {
+ display: flex;
+ flex-direction: column;
+}
+#tabs .import-row > .import-col > .section-panel {
+ flex: 1 1 auto;
+ width: 100%;
+ margin-bottom: 15px;
+}