Validate maximum number of data-driven paint properties per layer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
The maximum number of properties that can be data-driven in a single layer simultaneously is effectively limited by `GL_MAX_VERTEX_ATTRIBS`, which can be as low as 8. As we grow the number of data-driven properties, it becomes more likely that a style author could go over this limit unknowingly, test on devices that support `GL_MAX_VERTEX_ATTRIBS` > 8, see nothing wrong, and then deploy and have the style break on lower-end devices.
We should introduce style validation to prevent this. The validation rule should enforce a limit on the number of data-driven paint properties used per layer. The limit varies by layer type, and is defined by (8 - maximum number of _non_-paint-property attributes required by any shader used for that layer type).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named in the issue. Start by locating the style-validation entry point and the per-layer shader attribute definitions; verify the computed limit for each layer type and add validation coverage showing that styles exceeding the limit are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100