Make comment box trigger options configurable via config.yaml - #78
Merged
Conversation
Agent-Logs-Url: https://github.com/biomedicalGenomicsCNAG/ShinyImageVoteR/sessions/1c1a80d2-5855-477e-a6a4-bab06d34da37 Co-authored-by: IvoLeist <28399610+IvoLeist@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update comment box options to be configurable
Make comment box trigger options configurable via config.yaml
Mar 30, 2026
- Added configuration options for comment boxes in voting options via `radio_options` in config.yaml. - Updated functions and documentation to reflect changes in configuration structure. - Adjusted tests to validate new configuration mappings and behaviors.
IvoLeist
marked this pull request as ready for review
March 30, 2026 22:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The voting UI's comment box visibility was hardcoded to trigger only for
diff_varandnone_of_above. This PR makes that list configurable so operators can show the comment box for any combination of radio options (or all of them).Changes
config.yaml— Newcomment_trigger_optionsfield:load_config.Rc("diff_var", "none_of_above")when field is absent (backward compatible)radio_options2val_map; errors on unknown valuesmod_voting.R(UI) — JS condition forconditionalPanelis now generated from config; empty list produces"false"(panel hidden)mod_voting.R(server) — Comment persistence check replaced from hardcoded||comparisons to%in% cfg$comment_trigger_options