Skip to content

Fix add channel button adding default channel when channel axis is 0#31

Merged
dannda merged 2 commits intodevfrom
add_channel_fix
Dec 5, 2025
Merged

Fix add channel button adding default channel when channel axis is 0#31
dannda merged 2 commits intodevfrom
add_channel_fix

Conversation

@AlexSurtees
Copy link
Copy Markdown
Collaborator

Description

Adding a channel automatically added the default channel (first one in list) due to a mistake in the logic when checking if the channel_axis was defined (unintentionally excluding 0 values as well as null).

Fixes # (issue)
Fixes #17

Type of change

  • 🐛 Bug fix (non-breaking change that resolves an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • ⚡ Optimisation (non-breaking improvement to performance or efficiency)
  • 🧩 Documentation (adds or improves documentation)
  • 🧱 Maintenance (refactor, dependency update, CI/CD, etc.)
  • 🔥 Breaking change (fix or feature that causes existing functionality to change)

Checklist

  • All tests pass (eg. npm test)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)
  • Documentation updated (if required)

@AlexSurtees AlexSurtees requested a review from dannda December 3, 2025 13:43
@AlexSurtees AlexSurtees changed the base branch from main to dev December 3, 2025 13:48
Copy link
Copy Markdown
Collaborator

@will-moore will-moore left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.

It would be really handy to enable netlify builds on this repo so that each PR is automatically deployed. We used to have that a while back on hms vizarr repo.

Tested locally and it's looks good 👍

@AlexSurtees
Copy link
Copy Markdown
Collaborator Author

AlexSurtees commented Dec 4, 2025

Thanks for the fix.

It would be really handy to enable netlify builds on this repo so that each PR is automatically deployed. We used to have that a while back on hms vizarr repo.

Tested locally and it's looks good 👍

@will-moore I believe we have automated deployments when the main branch is updated, @davehorsfall may be able to confirm this. Since we are working in a main -> dev -> feature branch workflow there will be a slight delay in the fix being deployed.

@will-moore
Copy link
Copy Markdown
Collaborator

I meant that it would be useful for testing PRs before they are merged.

We have this enabled on ome-ngff-validator e.g. see ome/ome-ngff-validator#64 and a bunch of other repos. It's very easy and free to set up - login to netlify with your github account (the BioNGFF account) and point it at the repos you want to deploy.

@AlexSurtees
Copy link
Copy Markdown
Collaborator Author

I meant that it would be useful for testing PRs before they are merged.

We have this enabled on ome-ngff-validator e.g. see ome/ome-ngff-validator#64 and a bunch of other repos. It's very easy and free to set up - login to netlify with your github account (the BioNGFF account) and point it at the repos you want to deploy.

Ah, I see now - thanks Will. This does indeed seem useful, I'll chat to the team and see if we can get it set up.

@dannda dannda merged commit 6abb421 into dev Dec 5, 2025
1 check passed
@dannda dannda deleted the add_channel_fix branch December 5, 2025 15:03
@davehorsfall
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Adding active channels

4 participants