Skip to content

Conversation

@CommanderStorm
Copy link
Member

@CommanderStorm CommanderStorm commented Nov 30, 2025

currently our expressions type system is typescript-ish types (not quite) and mostly documented in MD.

I think documenting this in a structured form has advantages, such as moving the docs to the appropriate place:

image

Breakage report:

  • gl-js -> ✅ render tests, codegen
  • maputnik -> ✅ unit-tests, dev mode

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.70%. Comparing base (2e757d5) to head (0c90f96).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1391   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files         111      111           
  Lines        4387     4387           
  Branches     1389     1389           
=======================================
  Hits         4111     4111           
  Misses        276      276           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2025

Size Change: 0 B

Total Size: 134 kB

ℹ️ View Unchanged
Filename Size
dist/index.cjs 67.5 kB
dist/index.mjs 66.4 kB

compressed-size-action

{
"name": "interpolation_type",
"type": "[\"linear\"] | [\"exponential\", base] | [\"cubic-bezier\", x1, y1, x2, y2]"
"type": ["[\"linear\"]", "[\"exponential\", base]", "[\"cubic-bezier\", x1, y1, x2, y2]"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should likely be documented as a array with one syntax enum in it.
Still fairly messy as-is.

Different PR though.

@CommanderStorm CommanderStorm marked this pull request as ready for review November 30, 2025 00:38
@CommanderStorm
Copy link
Member Author

I am having a bit of trouble getting the maputnik integration tests to run at all.
They don't seem to work on my PC at all. Not sure how to setup this environment.

Sice the dev mode works and the unit tests run, i am not super concearned.
Also, maputnik does not really support expressions.

@HarelM
Copy link
Collaborator

HarelM commented Nov 30, 2025

I don't think Maputnik cares about expression syntax, this was added recently to mimic the typescript syntax, mainly for the docs, you should be able to find the relevant PR using blame.
I hoped this could be leveraged to generate the typescript expressions types from it, not sure where this is now though, and if it moves us in this direction or not.
Might be outside the scope of this PR although I'm not sure what this PR adds then...?

@CommanderStorm
Copy link
Member Author

not sure where this is now though, and if it moves us in this direction or not.

I don’t think fully correct and complete codegen is realistically possible right now without manual hacks.
What this PR does achieve is moving us closer to a state where codegen could become viable.

Might be outside the scope of this PR although I'm not sure what this PR adds then...?

This PR adds value by making the type system for expressions more consistent and easier to work with.

Documenting things in Markdown works for now, but if we want to support expression codegen in the future - and some of our tools already rely on general codegen - then having a more coherent type system becomes increasingly important.

As noted above, this PR doesn’t represent the final state needed for actual codegen, but it is an important stepping stone toward that goal.

@HarelM
Copy link
Collaborator

HarelM commented Nov 30, 2025

Fair enough, thanks for the extra info.

@CommanderStorm CommanderStorm merged commit 7fcea88 into main Nov 30, 2025
7 checks passed
@CommanderStorm CommanderStorm deleted the expressions-reworking branch November 30, 2025 10:23
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.

4 participants