refactor(ipa): Move index ownership to <Guidelines> via context#54
Merged
Conversation
<Guideline> now reads a boolean context set by <Guidelines> to decide whether to render the numbered circle and whether to use <li> vs <div> as its root element. This keeps HTML semantics valid in both contexts and ensures the number badge only appears inside an ordered list. - GuidelinesContext.ts: boolean context + useIsInsideGuidelines hook - Guideline: conditional li/div root, conditional .index div, .numbered class carries counter-increment so standalone use has no side-effects - Guideline.test.tsx: new — asserts standalone renders as div without circle - Guidelines.test.tsx: updated — asserts children render as li with circles - component-fixtures.mdx: adds standalone <Guideline> fixture; fixes single-child section to have exactly one child
bc09f53 to
ebf1f2f
Compare
wtrocki
approved these changes
Jun 10, 2026
Member
|
Can we attach screenshot containing changes? |
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.
Tickets: CLOUDP-406096
<Guideline>now reads a boolean context set by<Guidelines>to decide whether to render the numbered circle and whether to use<li>vs<div>as its root element. The number badge only appears inside<Guidelines>; a standalone<Guideline>renders without it.