Skip to content

UI: Consolidate parameter-related settings into Parameter Selection tab#1239

Open
Gero1999 wants to merge 7 commits intomainfrom
1238-enhancement/consolidate-parameter-settings
Open

UI: Consolidate parameter-related settings into Parameter Selection tab#1239
Gero1999 wants to merge 7 commits intomainfrom
1238-enhancement/consolidate-parameter-settings

Conversation

@Gero1999
Copy link
Copy Markdown
Collaborator

Issue

Closes #1238

Description

Moves all parameter-related configuration into the Parameter Selection tab so users don't need to switch tabs to configure what gets calculated:

  • Partial Interval Calculations → collapsible accordion below the parameter matrix
  • Ratio Calculations → collapsible accordion below intervals
  • Units button → header row, next to the PK parameter details button
  • Detected Study Types → remains at the bottom (collapsible, unchanged)

The Settings tab is renamed to General Settings and now only contains: General Settings, Data Imputation, Flag Rule Sets, and the Download settings button.

All accordion sections in Parameter Selection are collapsed by default to keep the page clean.

How to test

  1. Layout: Open the app → NCA Setup → verify "General Settings" and "Parameter Selection" tabs exist
  2. Parameter Selection tab: Verify the matrix is at the top, followed by collapsed accordions for Partial Interval Calculations, Ratio Calculations, and Detected Study Types. Units and PK parameter details buttons should be in the header row.
  3. Partial Intervals: Expand the accordion → Add Row → fill in an interval → Run NCA → verify the interval appears in results
  4. Ratio Calculations: Expand the accordion → configure a ratio → Run NCA → verify ratio appears in results
  5. Units button: Click it → verify the units modal opens and works as before
  6. General Settings tab: Verify it contains General Settings, Data Imputation, Flag Rule Sets, and Download settings button — no Partial Intervals or Ratios
  7. Settings round-trip: Download settings → reload → upload → verify all settings (including intervals and ratios) are restored

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented
  • R script works with the new implementation (if applicable)
  • Settings upload works with the new implementation (if applicable)

Notes to reviewer

No server logic was changed. All changes are UI reorganization:

File What changed
settings.R Extracted partial_intervals_ui() as standalone function. Removed the accordion panel from settings_ui(). Fixed stale accordion open parameter.
parameter_selection.R Added units_ui, intervals_ui, ratios_ui parameters. Renders them in the header row and as accordion panels. Updated help dropdown.
nca_setup.R Renamed tab to "General Settings". Passes UI elements to parameter_selection_ui() via args. Removed ratios/units from Settings tab.

Server wiring is preserved because all UI elements keep their original namespace IDs (e.g., partial_intervals_ui(ns(\"nca_settings\")) matches settings_server(\"nca_settings\", ...))."

Gero1999 and others added 4 commits April 20, 2026 13:46
Move the Partial Interval Calculations UI into a standalone
function so it can be rendered in the Parameter Selection tab.
Server logic remains in settings_server unchanged.

Closes #1238

Co-authored-by: Ona <no-reply@ona.com>
parameter_selection_ui now accepts units_ui, intervals_ui, and
ratios_ui arguments. These are rendered as:
- Units button: in the header row next to PK parameter details
- Intervals: collapsible accordion below the matrix
- Ratios: collapsible accordion below intervals
- Detected Study Types: remains at the bottom

Help dropdown updated to describe all sections.

Co-authored-by: Ona <no-reply@ona.com>
- Rename 'Settings' tab to 'General Settings'
- Move Units button, Partial Intervals, and Ratio Calculations
  into the Parameter Selection tab via parameter_selection_ui args
- Remove Ratio Calculations accordion from General Settings
- General Settings now contains: General Settings, Data Imputation,
  Flag Rule Sets, and Download settings button

Co-authored-by: Ona <no-reply@ona.com>
Remove stale 'Parameter Selection' reference from the accordion
open list — that panel no longer exists in settings_ui.

Co-authored-by: Ona <no-reply@ona.com>
@Gero1999 Gero1999 changed the title Consolidate parameter-related settings into Parameter Selection tab UI: Consolidate parameter-related settings into Parameter Selection tab Apr 20, 2026
@Gero1999 Gero1999 requested review from Shaakon35 and js3110 April 20, 2026 14:06
@Gero1999 Gero1999 marked this pull request as ready for review April 20, 2026 14:06
Copy link
Copy Markdown
Collaborator

@js3110 js3110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! makes much more sense, and looks good and works well :D

Gero1999 and others added 3 commits April 21, 2026 07:59
Reflect the new tab layout:
- 'Setup > Parameter Selection' → 'Parameter Selection > Matrix'
- 'Additional Analysis > Ratios' → 'Parameter Selection > Ratio Calculations'

Co-authored-by: Ona <no-reply@ona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate parameter-related settings into Parameter Selection tab

2 participants