Skip to content

Improve scenario name UI - #36

Merged
tomjemmett merged 7 commits into
mainfrom
fix_33
Sep 15, 2026
Merged

tomjemmett merged 7 commits into
mainfrom
fix_33

Conversation

@tomjemmett

Copy link
Copy Markdown
Member

resolves #33

  • only show relevant checkboxes, rather than disabling them
  • hide the naming guidance if a valid scenario name has been entered
  • make the guidance link appear after the validation messages
  • change the colour of the validation messages to red

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

It introduces a new undeclared {withr} dependency in server logic and uses a likely-unsupported bslib theme variable, both of which risk the intended behavior not working in deployment.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR updates the “Scenario name” UX to reduce confusion around unavailable scenario actions and to improve validation/guidance presentation in the Shiny UI.

Changes:

  • Only presents scenario-type radio options when they’re actually available (instead of disabling them).
  • Reorders the “Start” button vs naming guidance content and aligns the button without extra UI wrapper markup.
  • Attempts to theme validation message color via bslib theme variables.
File summaries
File Description
R/app_ui.R Simplifies scenario-type radios, reorders start button vs naming guidance, and adds a theme variable intended to make validation messages red.
R/app_server.R Adjusts validation-side show/hide behavior for naming guidance and updates radio choices dynamically based on whether saved scenarios exist.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • 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_server.R
Comment thread R/app_ui.R Outdated
Comment thread R/app_server.R
@Lextuga007

Copy link
Copy Markdown
Member

I like this approach, thank you. Only change is that the text colour as we still need to avoid red but the use of symbols like the triangle with exclamation with text, perhaps bold, would be more accessible.

@tomjemmett
tomjemmett marked this pull request as ready for review September 15, 2026 13:04
@tomjemmett

Copy link
Copy Markdown
Member Author

you are somewhat limited to what you can achieve with shiny validation though, at least you may have to spend a lot of time unpicking the classes and figuring out what to change. shiny validation does append aria-live="polite" [docs] to the container

Comment thread R/app_ui.R Outdated
Comment thread R/app_ui.R Outdated
@tomjemmett

Copy link
Copy Markdown
Member Author

achieved this with a bit of css:

image

ideally we would utilise aria-describedby, but I don't think we will get that level of control.

@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.

Works ok locally and did a build check all passes. Thanks for looking into ways of supporting the text using CSS, much appreciated.

@tomjemmett
tomjemmett merged commit c57fe9a into main Sep 15, 2026
2 checks passed
@tomjemmett
tomjemmett deleted the fix_33 branch September 15, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Improve accessibility of UI and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Developer greyed options for scenario selection isn't clear on permissions

3 participants