fix: scope quick analyze to the clicked sample#1121
Open
igboyes wants to merge 5 commits into
Open
Conversation
Quick analyzing a single sample row unioned that sample into the checkbox selection and opened the dialog over the whole selection. The dialog's samples are now held in their own state, set to `[item]` from a row and to the selected samples from the toolbar, so the two paths no longer share `selected`. Collapses the `selectOnQuickAnalyze` / `setOpenQuickAnalyze` prop pair on SampleItem and SampleSelectionToolbar into a single `onQuickAnalyze` callback, and drops the now-dead `onClear` prop and empty-samples effect from QuickAnalyze. Row checkboxes and quick analyze buttons get sample-scoped accessible names, since every row previously exposed the same "checkbox" and "quick analyze" labels.
A row's quick analyze showed "Selected Samples 1". It now reads "Selected Sample" with no count, while the selection toolbar keeps the plural title and count badge even when only one sample is selected. The two cases are indistinguishable from the sample count alone, so SamplesList tags the dialog's samples with whether they came from the selection.
The sample list capped its height and always showed a vertical scrollbar, even when the dialog held one sample. The cap and scrollbar now apply only to a selection, which can outgrow the dialog.
The four fields cleared four different bottom margins: 0.5rem under the sample list, 1.5rem under the workflow radios (from Box, which bakes in its own mb-6), 2rem under the subtractions, and a 2rem margin on the reference field clawed back by a -1.5rem margin on the error message. Every field wrapper now owns its spacing and clears 1.5rem. Box's margin is zeroed where it would stack, the reference error hugs its select, and the footer supplies its own padding. Drops the footer's `[&_button]:ml-auto`, which reached for a button that justify-between already right-aligns.
Replaces the workflow radio list with the boxed SelectBox picker already used to choose a reference creation method, and gives each workflow a line saying what it finds: Pathoscope finds known viruses, NuVs novel ones. SelectBox no longer bakes in a bottom margin, so a caller can place it without fighting a stacked margin. CreateReference keeps its old spacing through a wrapper.
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.
Summary
SelectBoxpicker and describes what each workflow finds. Evens out the dialog's field spacing, which ran from 0 to 2rem and leaned on a negative margin.