Description
After merging #1103 and #1059, some changes from #1103 were lost during the merge of #1059 into main. The merge conflict resolution in inst/shiny/modules/tab_nca/zip.R dropped the settings comment UI that #1103 added to the export modal.
Root cause
PR #1059 heavily restructured the export modal in zip.R (added slide customisation, validation, multi-step flow). When it was merged after #1103, the conflict resolution dropped the settings comment UI elements that #1103 had added.
What's missing in zip.R
Two pieces from #1103 were lost in the export modal:
1. Settings comment UI element (container + textInput)
The settings_comment_container div with the textInput should appear in the export modal (inside .show_export_modal()) after the "Data tables" format selector, hidden by default and shown when settings_file is selected in the tree. On the #1103 branch this was:
shinyjs::hidden(
div(
id = ns("settings_comment_container"),
tags$br(),
h4("Comment ", tags$small("(optional)")),
textInput(
ns("settings_comment"),
label = NULL,
placeholder = "e.g. final NCA, first draft"
)
)
)
The observer that shows/hides this container is still present (lines 435-442 on main) but is orphaned — it references a UI element that no longer exists.
2. Settings comment storage in ZIP download handler
The line that stores the comment value for use by .export_settings() is missing from the ZIP download handler:
session$userData$settings_save_comment <- input$settings_comment
Without this, zip-utils.R::.export_settings() always gets an empty comment (session$userData$settings_save_comment is never set during ZIP export), so versioned settings in the ZIP always have a blank comment.
To reproduce
- Upload data, run NCA
- Open the export modal (Save button)
- Select
settings_file in the export tree
- No comment field appears (it should)
- Export ZIP — the
settings.yaml inside has an empty comment field
Expected behaviour
- When
settings_file is selected in the export tree, a "Comment (optional)" text input appears
- The comment entered is stored in
session$userData$settings_save_comment before ZIP creation
- The comment appears in the versioned
settings.yaml inside the exported ZIP
Fix scope
- Add the
settings_comment_container div with textInput back into .show_export_modal() in zip.R, after the "Data tables" format selector
- Add
session$userData$settings_save_comment <- input$settings_comment to the ZIP download handler (in the confirm_export or download_zip_configured observer, before the export runs)
Description
After merging #1103 and #1059, some changes from #1103 were lost during the merge of #1059 into main. The merge conflict resolution in
inst/shiny/modules/tab_nca/zip.Rdropped the settings comment UI that #1103 added to the export modal.Root cause
PR #1059 heavily restructured the export modal in
zip.R(added slide customisation, validation, multi-step flow). When it was merged after #1103, the conflict resolution dropped the settings comment UI elements that #1103 had added.What's missing in
zip.RTwo pieces from #1103 were lost in the export modal:
1. Settings comment UI element (container + textInput)
The
settings_comment_containerdiv with thetextInputshould appear in the export modal (inside.show_export_modal()) after the "Data tables" format selector, hidden by default and shown whensettings_fileis selected in the tree. On the #1103 branch this was:The observer that shows/hides this container is still present (lines 435-442 on main) but is orphaned — it references a UI element that no longer exists.
2. Settings comment storage in ZIP download handler
The line that stores the comment value for use by
.export_settings()is missing from the ZIP download handler:Without this,
zip-utils.R::.export_settings()always gets an empty comment (session$userData$settings_save_commentis never set during ZIP export), so versioned settings in the ZIP always have a blank comment.To reproduce
settings_filein the export treesettings.yamlinside has an empty comment fieldExpected behaviour
settings_fileis selected in the export tree, a "Comment (optional)" text input appearssession$userData$settings_save_commentbefore ZIP creationsettings.yamlinside the exported ZIPFix scope
settings_comment_containerdiv withtextInputback into.show_export_modal()inzip.R, after the "Data tables" format selectorsession$userData$settings_save_comment <- input$settings_commentto the ZIP download handler (in theconfirm_exportordownload_zip_configuredobserver, before the export runs)