Skip to content

feat(pick-report): render nested S-101 complex attributes#46

Merged
beetlebugorg merged 1 commit into
mainfrom
feat/pick-report-s101-nested
Jul 13, 2026
Merged

feat(pick-report): render nested S-101 complex attributes#46
beetlebugorg merged 1 commit into
mainfrom
feat/pick-report-s101-nested

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

A native S-101 feature's pick attributes carry complex attributes as nested JSON — a complex attribute is an object (repeatable, so an array of instances): topmark -> [{topmarkDaymarkShape, colour}], featureName -> [{name, language, nameUsage}], information -> [{text}, ...]. The picker stringified the value, so these showed as '[object Object]'.

Render them recursively instead: _attrRows walks the value — a string is a leaf row; an array/object is an indented group (a bold header per instance, numbered when repeated, then its sub-attributes one level deeper). Simple S-57 attrs are unchanged (still flat rows). The S-101 featureName complex is lifted to the subtitle (its English name), mirroring how OBJNAM is shown.

A native S-101 feature's pick attributes carry complex attributes as nested
JSON — a complex attribute is an object (repeatable, so an array of instances):
topmark -> [{topmarkDaymarkShape, colour}], featureName -> [{name, language,
nameUsage}], information -> [{text}, ...]. The picker stringified the value, so
these showed as '[object Object]'.

Render them recursively instead: _attrRows walks the value — a string is a leaf
row; an array/object is an indented group (a bold header per instance, numbered
when repeated, then its sub-attributes one level deeper). Simple S-57 attrs are
unchanged (still flat rows). The S-101 featureName complex is lifted to the
subtitle (its English name), mirroring how OBJNAM is shown.
@beetlebugorg beetlebugorg merged commit 09a48da into main Jul 13, 2026
3 checks passed
@beetlebugorg beetlebugorg deleted the feat/pick-report-s101-nested branch July 13, 2026 02:13
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.

1 participant