CATALOG-12399: Hide disable-and-hide option values on selection#2678
Draft
BC-RSikora wants to merge 1 commit into
Draft
CATALOG-12399: Hide disable-and-hide option values on selection#2678BC-RSikora wants to merge 1 commit into
BC-RSikora wants to merge 1 commit into
Conversation
…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>
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.
Jira: CATALOG-12399
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.jsupdateDisabledOptionValues(data)reads the newdata.disabled_option_valuesarray and hides each matching[data-product-attribute-value]node via the existingdisableAttribute(..., 'hide_option'). The server recomputes the list on every option change, so values are re-shown when they drop out of it. Hooked intooptionChangeDecoratorafterupdateProductAttributes. Out-of-stock hiding is untouched: re-show only applies to nodes this feature hid, tracked via aruleHiddendata 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_fixon 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