Skip to content

Conversation

@ascibisz
Copy link
Contributor

@ascibisz ascibisz commented Nov 8, 2025

Problem

Right now, if you select "No Gradient" from the gradient dropdown, it fails to show up as the selected option in the input fields form.
Ticket

Solution

I did verify that the recipe JSON was being updated appropriately when the user selects "No Gradient", so all I needed to change was how we're determining which gradient option is selected.

There are two parts of the recipe JSON that are updated based on recipe selection, the gradient field that is set to membrane_gradient or nucleus_gradient etc, and the packing_mode field which is either set to random for the "No Gradient" case or gradient for all other cases. We hadn't been looking at packing_mode when determining what gradient option is selected, but that's the only way to determine if "No Gradient" is selected, so I added some logic to check this field as well.

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 20.14% 366 / 1817
🔵 Statements 20.14% 366 / 1817
🔵 Functions 41.37% 24 / 58
🔵 Branches 71.68% 81 / 113
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/utils/gradient.ts 0% 100% 100% 0% 10, 14-16, 29-32, 37-40, 43-47, 49, 51-52, 55, 58-59, 62-63, 65-66, 69-73, 75-76, 78-79, 81-87, 89-99
Generated in workflow #145

@github-actions
Copy link

github-actions bot commented Nov 8, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-12 21:16 UTC

@ascibisz ascibisz linked an issue Nov 10, 2025 that may be closed by this pull request
@ascibisz ascibisz marked this pull request as ready for review November 10, 2025 18:26
Copy link
Contributor

@rugeli rugeli left a comment

Choose a reason for hiding this comment

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

Played around on the preview site, No Gradient worked well, and packing_mode in the full data updated to random in real time!

Just noticed one mismatch: after selecting No Gradient, the gradient field in the full recipe data still shows the previously selected gradient(see screenshot). It'd be clearer to either update the field value to no_gradient or hide it altogether, whichever is simpler. Lmk what you think!
Screenshot 2025-11-10 at 1 29 42 PM

Copy link
Contributor

@interim17 interim17 left a comment

Choose a reason for hiding this comment

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

Non blocking question.

@ascibisz
Copy link
Contributor Author

Played around on the preview site, No Gradient worked well, and packing_mode in the full data updated to random in real time!

Just noticed one mismatch: after selecting No Gradient, the gradient field in the full recipe data still shows the previously selected gradient(see screenshot). It'd be clearer to either update the field value to no_gradient or hide it altogether, whichever is simpler. Lmk what you think! Screenshot 2025-11-10 at 1 29 42 PM

@rugeli I wasn't able to quickly find a solution that wouldn't throw an error in cellpack (setting gradient to no_gradient or null both threw errors), so I think let's investigate this further in a follow up ticket

@ascibisz ascibisz merged commit 2079f71 into main Nov 12, 2025
2 checks passed
@ascibisz ascibisz deleted the bug/no-gradient branch November 12, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selecting "No Gradient" Isn't Working

4 participants