Skip to content

fix: link the feature gallery's contents to authored sections and keep option cards' first box on upgrade - #6396

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6388
Nov 18, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6388

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

This fixes the two nightly journey failures that #6315 caused. The feature gallery's "On this page" contents linked two rows to generated heading ids, and the new lf-group worked example's option cards grew 2px on upgrade. Before this change both tests fail on main, and after it both pass locally:

  • tests/journeys/test_render_navigation.py::test_the_feature_gallery_exercises_its_core_journeys
  • tests/journeys/test_widget_quality.py::test_bundled_widgets_meet_the_widget_quality_checks[default]

Contents. #6315 changed two gallery parts from <section role="group"> to lf-group: "Evidence widgets" (#bg-default-presentation) and "Interactive sample on this page" (#bg-inline-sample-section). Neither part asks a question of its own. #6315 also settled that a heading names only a section or article it opens (titledElement in browser/runtime/addressable-names.js), so a heading never names a Leaf element. That leaves the h2 inside each group as its own destination, and the contents lent it an lf-bg-contents-section-N id. This change makes both parts plain <section>s again, so the contents links them by their authored ids. leaf page check on the gallery stays clean.

Option card. A labeled option in a live group gets a pick mark from the runtime. The mark floats over a 22px state band (--lf-card-state-height). At working density a one-line card's line is 20.3px, so the card grew from 40.3px to 42px once the mark arrived. I checked this outside the gallery: the group isn't a flex box before or after upgrade, so the growth comes from the card itself, not from lf-group. #6315 added the first worked example with that card shape. In packages/default/styles/options.css, the card's content box now holds the band's height before the mark arrives. After upgrade the float already holds that height, so the presented card doesn't change. leaf-dev stills for ship-option-references, alert-options-in-pane, settled-option, plan-option-card-picked, ideas-ask and hub-choice reports 6 of 6 states unchanged against main. The 47 option-layout tests in tests/browser/test_render_options.py (-k "height or row or card or box") pass.

Left open, not changed here: on any page, a question lf-group whose heading is a contents row gets a lent heading id rather than the group's authored id. That follows from #6315's naming rule. Whether the contents should prefer an enclosing lf-group's id is a design call for that rule, not something this fix decides.

Closes #6388 — automated triage

…option card's first box on upgrade

#6315 moved two feature-gallery parts that ask nothing of their own, the
evidence widgets and the interactive sample, from `<section role="group">`
to `lf-group`. A heading inside an `lf-group` titles no element
(`titledElement` reads only `section` and `article`), so the contents lent
each of those `h2`s a generated id instead of linking to the part's
authored id. Both are plain parts of the page again, `<section>`s, so the
contents links them by their own ids.

The same change's `lf-group` worked example is the first to show a live,
one-line labeled option card at working density. The pick mark the runtime
adds floats over a 22px state band (`--lf-card-state-height`), so the card
grew from a 20.3px line to 22px on upgrade. The card's content now holds
that band before the mark arrives; once the mark is there its float holds
the same height, so the presented card does not change.

Behavior changed: an unupgraded labeled option card in a live group is at
least the state band tall.

Closes #6388
@leaf-agent
leaf-agent merged commit 84b3b9c into main Nov 18, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6388 branch November 18, 2026 17:23
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.

Feature-gallery contents and widget-quality journeys fail since #6315 moved questions into lf-group

1 participant