Skip to content

Disable 'Merge into 1 object' option on View/Edit Samples page based on Selected Sample Count#1805

Open
nozomione wants to merge 2 commits intodevfrom
nozomione/1722-disable-include-merged-checkbox
Open

Disable 'Merge into 1 object' option on View/Edit Samples page based on Selected Sample Count#1805
nozomione wants to merge 2 commits intodevfrom
nozomione/1722-disable-include-merged-checkbox

Conversation

@nozomione
Copy link
Member

Issue Number

Closes #1722

@dvenprasad See the latest UI here. Thank you!

Purpose/Implementation Notes

I've disabled the Merge single-cell samples into 1 object option on the View/Edit Samples page, except under the following conditions:

  • All project samples in the table are selected
  • All project samples have been added to My Dataset

Types of changes

  • Refactor (addresses code organization and design mentioned in corresponding issue)

Functional tests

N/A

Checklist

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Screenshots

N/A

…only if all samples have been selected in the table or all project samples have been added to My Dataset on the View/Edit Samples page
@nozomione nozomione self-assigned this Feb 9, 2026
@nozomione nozomione requested a review from dvenprasad February 9, 2026 18:38
@nozomione nozomione changed the title Diisable 'Merge into 1 object' option on View/Edit Samples page based on Selected Sample Count Disable 'Merge into 1 object' option on View/Edit Samples page based on Selected Sample Count Feb 10, 2026
Copy link
Member

@dvenprasad dvenprasad left a comment

Choose a reason for hiding this comment

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

LGTM! 🦇 🦇 🦇

// Enable the include merge checkbox only if:
// - All project samples in the table are selected
// - All project samples have been added to myDataset
const [enableMergeCheckBox, setEnableMergeCheckBox] = useState(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets rename this to describe what information it is capturing. Since this variable is only used for disabling the button

Copy link
Member Author

@nozomione nozomione Feb 11, 2026

Choose a reason for hiding this comment

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

🗒️ Renamed to allSingleSamplesSelected.

I've also uncheck the include merge checkbox when any single-cell sample is deselected in the table, in case the option was previously selected.

…lected, and uncheck the include merge option (in case if it was previosuly selected) if any single-cell sample is deselected, improve the comments
@nozomione
Copy link
Member Author

I've applied the feedback, and this PR is ready for another look. Thank you, David!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cases when to disable about 'Merge into 1 object' option on View/Edit Samples page

3 participants

Comments