Skip to content

switch all selectInputs to selectizeInputs - #32

Merged
tomjemmett merged 3 commits into
mainfrom
fix_dropdowns
Sep 14, 2026
Merged

tomjemmett merged 3 commits into
mainfrom
fix_dropdowns

Conversation

@tomjemmett

Copy link
Copy Markdown
Member

related to #22, copilot didn't find all cases that needed to be updated

closes #21

Copilot AI lite review requested due to automatic review settings September 14, 2026 11:24
@tomjemmett tomjemmett self-assigned this Sep 14, 2026
related to #22, copilot didn't find all cases that needed to be updated

closes #21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The UI currently passes an invalid selectize argument to selectizeInput() (runtime error) and one newly-converted selectize control lacks the established dropdownParent="body" option used to prevent clipping.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR continues the UI refactor started in #22 by converting remaining shiny::selectInput() controls to shiny::selectizeInput() and aligning server-side updates accordingly, primarily to avoid dropdown menus being clipped inside card/collapse containers (issue #21).

Changes:

  • Converted several UI dropdowns in R/app_ui.R from selectInput to selectizeInput, adding options = list(dropdownParent = "body") in most cases.
  • Updated corresponding server logic in R/app_server.R from updateSelectInput() to updateSelectizeInput() for the migrated inputs.
File summaries
File Description
R/app_ui.R Migrates UI dropdown inputs to selectizeInput and sets selectize dropdown rendering options to reduce overflow clipping.
R/app_server.R Migrates server-side dropdown updates to updateSelectizeInput to match the new UI input types.
Review details

Suppressed comments (1)

R/app_ui.R:160

  • This newly converted previous_scenario control is a selectizeInput, but unlike the other selectize inputs in cards/collapses it does not set options = list(dropdownParent = "body"). Without this, the dropdown can be clipped by the surrounding card/collapse overflow when the input is shown.
          shiny::selectizeInput(
            "previous_scenario",
            "Previous Scenario",
            NULL,
            width = "100%"
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread R/app_ui.R

@Lextuga007 Lextuga007 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Runs ok locally but I'd only checked the first two year drop downs before. This time I've been unable to get beyond setting up a test Scenario. Code looks ok though.

@tomjemmett
tomjemmett merged commit e62b8bc into main Sep 14, 2026
2 checks passed
@tomjemmett
tomjemmett deleted the fix_dropdowns branch September 14, 2026 12:44
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.

Horizon year dropdown restricted within card

3 participants