Repository navigation
[9.4-release] docs(extensions): PathStyleExtension reference for dashMode and dashUnits (#10584) - #10885
Merged
Conversation
…nits (#10584) * docs(extensions): document dash behavior with generated figures The dash work across this stack fixes six defects and adds three capabilities, but a reader had no way to tell those apart, and nothing to look at: the "Comparison between dash modes" image the extension docs carried for years was dropped when the Tips section was rewritten and never replaced. Adds a symptom-to-resolution table answering "which of my problems does upgrading solve, and which need a prop" — six of eleven listed symptoms resolve on upgrade, five need dashMode or dashUnits — and four figures: - path-style-dash-modes: the replacement for what was removed. One path with deliberately unequal segments, joints marked with ticks, drawn under all four dashMode x dashJustified combinations. - path-style-dash-density: the same straight line from 1/2/4/12/40/120 vertices, 'segment' beside 'path'. - path-style-dash-units: 'widths' against 'pixels' at z12/13/14. - path-style-dash-fixes: before/after for the automatic fixes. Every panel is a real render. "After" panels come from committed golden images, so a published figure cannot drift from what the code does — if behavior changes the golden test fails first. "Before" panels come from capture-before.sh, which reverts only the three behavior-carrying sources and re-renders; the spec and its geometry stay current so both halves of a pair draw the identical scene. Diffing today's golden against the layer-1 golden would not work: several of these cases had their geometry changed mid-stack, so that comparison would show two different scenes and overstate the fix. The figures go in docs/images/path-style/ rather than the deck.gl-data repo the other doc images use. That repo is not reachable from this environment; the tradeoff is ~185KB in-repo against docs that render immediately and a link check that passes. Moving them later is a four-URL swap. Two things the figures caught, both now covered by tests: - The offset fix claimed earlier in this stack was never demonstrable. Its render case uses dashMode 'segment', where the dash phase is zero and scaling it by the offset width changes nothing, so the case rendered identically before and after. path-dash-offset-mode-path covers the configuration where the fix actually applies. Dash period across offsets 0/2/4/8: before 43.4/42.4/42.4/41.6, after 43.4/43.4/43.4/43.4. It is spelled with the deprecated highPrecisionDash because that is the only spelling of a continuous phase existing in both the current and pre-9.4 API, which is what lets it be re-rendered for the comparison. - A scenario-table row overstated the dashJustified guard as fixing solid short segments. That case's golden never changed, and the arithmetic says why: a segment shorter than dashSize has no room for a gap and correctly renders solid either way. The guard removes an Inf/NaN degeneracy, and the docs now say so rather than implying justification rescues dense polylines. That ~4% offset drift does not read in a figure, so the pair is left out of path-style-dash-fixes with a comment saying why; a panel identical on both sides would suggest the fix did nothing. Also documents the v9.4 dash changes in whats-new and the highPrecisionDash deprecation in the upgrade guide, notes there that stored screenshots of billboarded, elevated, offset or fine-dashed paths will need regenerating, and records that getDashArray has always been relative to half the stroke width rather than the full width. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_014GipN1niYRgRuLVat2wujw * fix(docs): invalidate stale dash capture panels * docs(extensions): tighten dash upgrade notes * docs(extensions): frame PathStyleExtension as stroke construction * docs(extensions): address PathStyleExtension review feedback * docs(extensions): address API reference review * docs(extensions): consolidate PathStyleExtension reference * docs(extensions): finalize PathStyle dash guidance * docs(extensions): use rendered dash boundaries * fix(docs): invalidate stale dash figure panels first * docs(extensions): tighten PathStyle release guidance * docs(extensions): rewrite PathStyleExtension reference for new users * docs(extensions): remove static PathStyle dash figures * docs(extensions): add interactive PathStyleExtension demos Replace the CodePen embed with a road demo of dashes and offsets, and add a demo of dashMode and dashJustified on three shapes from the old figure. * docs(extensions): make road demo code copyable --------- Co-authored-by: Claude <[email protected]> (cherry picked from commit 4206483)
53 of 66 tasks
[Low impact] The PR appears safe to merge, with no actionable issues found. SummaryUpdates the
No actionable issues found. Review was based on code inspection; builds and browser checks were not run. Reviews (1) · Last reviewed commit: "docs(extensions): PathStyleExtension ref..." · Reviewed by Greptile |
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.
Follow up of #10584, for #10812
Background
Backports #10584 to
9.4-releasefor 9.4.1. The cherry-pick conflicts in the "Source" section of the PathStyleExtension reference, which links to9.4-releaseon this branch.Change List
path-style-extension.mdSource: keep the9.4-releaselink, add the path dash RFC line-xThe upgrade guide note on
highPrecisionDashlands under "Upgrading to v9.4". Lint and build pass on the 9.4.1 stack.Note
Low Risk
Documentation and website demo changes only; no runtime library code in this diff.
Overview
Backports PathStyleExtension documentation for v9.4.1: the API reference is rewritten around
dashMode,dashUnits, andhighPrecisionDashdeprecation, with MapLibre/SVG migration notes, troubleshooting, and a 9.4-release source link plus the path-dash RFC.Interactive docs replace the CodePen embed with in-site
PathStyleExtensionDemoandPathStyleDashModeDemo(website/src/doc-demos/extensions.js). The v9.4 upgrade guide documents migratinghighPrecisionDash: true→dashMode: 'path'.RFC edits align analytic antialiasing text with offset behavior (shared coverage when
PathLayer.antialiasingis on) and add a stroke-dashoffset follow-up in the path-dash RFC.Reviewed by Cursor Bugbot for commit 6991deb. Bugbot is set up for automated code reviews on this repo. Configure here.