Skip to content

CATALOG-12399: Hide disable-and-hide option values on selection#2678

Draft
BC-RSikora wants to merge 1 commit into
masterfrom
CATALOG-12399-disable-hide-option-values
Draft

CATALOG-12399: Hide disable-and-hide option values on selection#2678
BC-RSikora wants to merge 1 commit into
masterfrom
CATALOG-12399-disable-hide-option-values

Conversation

@BC-RSikora

@BC-RSikora BC-RSikora commented Jun 12, 2026

Copy link
Copy Markdown

Jira: CATALOG-12399

Front-end half. Pairs with bcapp PR #68696 (backend emit) and #68671 (over-hide fix). Needs disabled_option_values in the product-attributes response, gated by CATALOG-12399.disable_hide_rule_fix.

What/Why?

For a multi-attribute "disable and hide" rule (e.g. Color=red AND Size=big), the value should show and only hide once the rule's other attributes are selected, instead of being hidden outright.

product-details-base.js updateDisabledOptionValues(data) reads the new data.disabled_option_values array and hides each matching [data-product-attribute-value] node via the existing disableAttribute(..., 'hide_option'). The server recomputes the list on every option change, so values are re-shown when they drop out of it. Hooked into optionChangeDecorator after updateProductAttributes. Out-of-stock hiding is untouched: re-show only applies to nodes this feature hid, tracked via a ruleHidden data flag.

When the backend key is absent (flag off / older bcapp), the array is missing and the method no-ops.

Rollout/Rollback

Tied to CATALOG-12399.disable_hide_rule_fix on the backend. No theme setting. Rollback = revert.

Testing

Manual: on a product with a multi-attribute disable+hide rule, selecting the first attribute hides the conflicting value of the second; deselecting re-shows it. Local syntax check passes; jest/eslint run in CI.

Refs CATALOG-12399

…n selection

Consume the new `disabled_option_values` array from the product-attributes AJAX response
and hide each matching option value, so a "disable and hide" rule that spans several
attributes hides a value only once the rule's other attributes are selected. The list is
selection-relative and recomputed every change, so values are re-shown when they drop out
of it. Out-of-stock hiding is left untouched (tracked separately via a ruleHidden flag).

Refs CATALOG-12399
Co-Authored-By: Claude <noreply@anthropic.com>
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.

1 participant