Found while implementing #4941. Filed unassigned, not claiming.
packages/plugin-map/README.md documents a schema and an export that do not exist in the package. A reader who copies any of its snippets gets an empty map with no diagnostic.
What the README teaches vs what the code reads
| README |
Reality (packages/plugin-map/src/) |
center: { lat, lng } (object) |
center is read as a [lat, lng] tuple (MapConfigSchema = z.tuple); the object form fails validation, is warned about, and is ignored |
markers: [{ lat, lng, label }] |
never read — markers come from the queried records via latitudeField / longitudeField / locationField |
layers?: MapLayer[] |
never read; no layer support exists |
height?: number | string |
never read; the container height is fixed Tailwind classes |
onMarkerClick in the schema |
it is a React prop of ObjectMap, not a schema key |
import { mapComponents } from '@object-ui/plugin-map' + manual Object.entries(...) registration |
no such export: index.tsx exports ObjectMap / ObjectMapRenderer and self-registers object-map / map |
zoom?: number // Default: 10 |
there is no default zoom any more (PR #5000 — the camera fits the records unless one is declared) |
Nothing in the README mentions the keys that actually drive the component (objectName, data, map: { latitudeField, longitudeField, locationField, titleField, descriptionField }).
The accurate document is content/docs/plugins/plugin-map.mdx, which matches the code (and was updated by PR #5000). The README looks like it predates the ObjectQL-driven component and was never reconciled.
Suggested shape of the fix
Rewrite packages/plugin-map/README.md against the code, or reduce it to a pointer at the docs page plus the real ObjectMap props. Worth checking the sibling plugin-* READMEs in the same pass — this one is unlikely to be alone.
Note for whoever picks it up: content/docs/** is gated (check-doc-component-types), package READMEs are not, which is plausibly why the drift survived.
Found while implementing #4941. Filed unassigned, not claiming.
packages/plugin-map/README.mddocuments a schema and an export that do not exist in the package. A reader who copies any of its snippets gets an empty map with no diagnostic.What the README teaches vs what the code reads
packages/plugin-map/src/)center: { lat, lng }(object)centeris read as a[lat, lng]tuple (MapConfigSchema=z.tuple); the object form fails validation, is warned about, and is ignoredmarkers: [{ lat, lng, label }]latitudeField/longitudeField/locationFieldlayers?: MapLayer[]height?: number | stringonMarkerClickin the schemaObjectMap, not a schema keyimport { mapComponents } from '@object-ui/plugin-map'+ manualObject.entries(...)registrationindex.tsxexportsObjectMap/ObjectMapRendererand self-registersobject-map/mapzoom?: number // Default: 10Nothing in the README mentions the keys that actually drive the component (
objectName,data,map: { latitudeField, longitudeField, locationField, titleField, descriptionField }).The accurate document is
content/docs/plugins/plugin-map.mdx, which matches the code (and was updated by PR #5000). The README looks like it predates the ObjectQL-driven component and was never reconciled.Suggested shape of the fix
Rewrite
packages/plugin-map/README.mdagainst the code, or reduce it to a pointer at the docs page plus the realObjectMapprops. Worth checking the siblingplugin-*READMEs in the same pass — this one is unlikely to be alone.Note for whoever picks it up:
content/docs/**is gated (check-doc-component-types), package READMEs are not, which is plausibly why the drift survived.