PT-4313: Mirror the core review of the gutter coverage test - #18
Open
irahopkinson wants to merge 1 commit into
Open
irahopkinson wants to merge 1 commit into
irahopkinson wants to merge 1 commit into
Conversation
Carries the review round on paranext-core PR #2827 onto the twin test and the stylesheet comments so the copies stay in step. usj-nodes.css.gutter-coverage.test.ts: - Restore the parser-sanity floors on the derived map sizes. - Scope the nesting guard to rules that name a marker class, and fail a tracked property set anywhere but directly in a top-level marker rule (inside an at-rule, or an at-rule nested in the rule). - Read [dir=...] in any quoting or case, with or without a case flag, and a direction inside :not() as the other direction. - Report a direction asymmetry for a value set in only one direction, for margins and for text-indent. - Assert no hanging indent reaches past its marker's margin, which is what lets the focus-box comments say the marker's column always wins. - Spot-check each usfm.sty oracle as one object; compare the gutter maps with toEqual. - State the derivation's known limits in the header. usj-nodes.css: the two focus-box comments say what --verse-text-start does today, a fallback start that the marker's own column beats for every marker in this file. Co-authored-by: Claude Fable 5.1 <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.
Summary
Follow-up to #10 (PT-4313). The review of paranext-core's twin PR, paranext/paranext-core#2827, found things in the derived gutter coverage test that also apply here, plus two stale focus-box comments in the stylesheet. This carries the same changes so the twins stay in step. Test and comments only; no rendering change.
Test (
usj-nodes.css.gutter-coverage.test.ts)> 40and> 20entries). Both sides of the derived comparison come from the same parser, so a parser that started reading less would shrink them in step;> 0only catches reading nothing.@media print { .note { margin: 0 } }no longer trips it.[dir=…]is read in any quoting or case, with or without a case flag, plus:dir(); a direction inside:not()is read as the other direction.directionAsymmetriesreports a value set in only one direction, for margins and fortext-indent.min()for every marker in this file, so the claim is pinned rather than left to go stale.usfm.styoracle is compared as one object; the gutter maps are compared withtoEqual..pararules, the cascade approximated as direction-qualified-beats-agnostic, padding untracked,calc()unreadable, direction from[dir=…]/:dir()only, agnosticmargin-rightcounted as inline-start).Stylesheet (
usj-nodes.css)--verse-text-startdoes today: a fallback start that the marker's own column beats for every marker in this file, rather than "aligning the box with the poetry text start".Verification
usj-nodes.css.gutter-coverage.test.ts4/4 andusj-nodes.css.test.ts9/9.usj-nodes.cssbehave as intended: RTL-only margin, at-rule wrapping a marker rule, at-rule nested inside a marker rule, direction-qualified gutter rule,calc()value, hanging indent without margin, real margin in a compensation rule, agnosticmargin-right,!important,:not([dir='rtl'])and a hanging indent past its margin all fail; an unrelated nested rule, a hanging indent within its margin and the unchanged sheet pass.AI-assisted — Claude Fable 5.1, local Claude Code session (no session URL)
🤖 Generated with Claude Code
This change is