Issue #3586292: Ignore conditional context when disabled.

Description

See Improve conditional subcontext disabled-state b... (#3586292) • Unassigned • 1.0.0-beta4

Testing instructions

Testing Setup:

mkdir my-drupal-site && cd my-drupal-site ddev config --project-type=drupal11 --docroot=web ddev start ddev composer create-project drupal/cms ddev composer drupal:recipe-unpack ddev exec sed -i 's/"minimum-stability": "stable"/"minimum-stability": "dev"/' composer.json ddev composer require drupal/ai_context:dev-1.0.x -W ddev composer require drupal/ai_agents_debugger ddev launch go through installer in browser and choose the Byte site template ddev drush en ai_context ai_agents_debugger canvas_ai -y cd web/modules/contrib/ai_context switch to the relevant MR branch (see GitLab fork instructions) ddev drush cr

Pasted from Tamas' notes:

Manual UI verification (conditional toggle OFF, with a parent + one required child + one conditional child):

  • Conditional-child row is ghosted (italic, reduced opacity) via ai-context-item-list__row--conditional-disabled; required child and parent unaffected.
  • Label cell exposes the visually-hidden disabled-status text + the visually-hidden focusable settings link.
  • Subcontext icon on the disabled row carries tabindex="0", role="img", aria-label="Conditional subcontext is currently disabled.", and a data-ai-tooltip containing the settings-page link.
  • Editing the conditional child shows the "Conditional subcontext is disabled…" warning; editing the required child does not.
  • ?fieldset=subcontext deep-link opens the Subcontext fieldset on load (server-side #open; the JS scrollIntoView({block:'nearest'}) is a correct no-op when the fieldset is already in view).
  • Flipping the toggle back ON removes the ghosting and the disabled aria attributes.

Checklist

  • I have updated the MR title to use format: Issue #1234: My issue title.
  • I have updated the MR description to include: Closes #1234
  • I have performed a self-review of my own code
  • I have added or updated tests, or explained in the description why this change is not covered by tests
  • I have updated documentation for any new or changed functionality
  • I have written testing instructions and verified them locally
  • I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
  • This MR contains no breaking API or hook changes, or they are explicitly documented in the description

AI Compliance

Note

Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.

  • AI Assisted Code
    Mainly written by a human; AI used for autocomplete or partial generation under full human supervision.

  • AI Generated Code
    Mainly generated by AI, reviewed and approved by a human before this MR was created.

  • Vibe Coded
    Generated by AI and only functionally reviewed before this MR was created.

Closes #3586292

Edited by Kristen Pol

Merge request reports

Loading