-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symbol-clip: dynamic filter style spec changes #10977
Merged
Merged
Changes from 36 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2969f28
WIP dynamic filter splitting stage 1
b4689b9
Add tests for isDynamicFilter
ff60896
More test cases for isDynamicFilter
24fd71c
Existing static filters get passed through unmodified.
b66e22c
WIP extracting static filters
c68f159
Working case -> any translation
4bdf7a1
More tests for case -> any conversion
a609a4d
Add support for match branches
aa8cc2b
WIP: V0 of adding collapsing of dynamic expressions to true
e18336f
more test cases
035ec77
tests and some more refactoring
495b279
remove temory inspection code from unit tests
eac58f6
Fix dynamic filter detection
81cdbc8
Fix failing spec test
3c2f2d3
Units tests hopefully :green: now
4bee8da
Add test to cover for `null` in expressions
0d8d809
Address CR comments and reduce number of temporary allocations
e015ec5
remove gl-matrix as dependency of style-spec and inline a matrix mult…
53c644e
Fix lint issues
2a063b0
Add better error messages for expression compilation failures
d4e9ac3
Ensure location parameter is passed down
0265792
Remove symbol-clip from the style-spec
80a52d7
Remove unused property-expression type
ea727a5
Move filterSpec to v8.json and replace symbol-clip with dynamic filter
b0533d8
Fix unit tests
2f8ed09
Fix most flow errors
566b59c
finally flow is happy
450ca3f
Add expression validation code
c8d7ed5
Add api-supported tests for validation
a121924
Fix some failing unit tests
df96e1d
Ensure layer._featureFIlter is updated on main thread as well
796aca0
Ensure layerType is passed down to validation
d70d880
Merge branch 'symbol-clip' of github.com:mapbox/mapbox-gl-js into dyn…
9bb07a5
Fix flow and linting
6a9defa
Fix unit tests
8e6bd6e
Pass 1 of addressing CR comments
5189a1a
Address review comments
e99fe09
cast through any to clean up
ce2ace4
backticks 1
13ffe33
backticks 2
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like Flow is dictating the structure of this whole section at the expense of readability!
Would Flow be ok with a
if (!filterFunc) {return;}
so that you could unwrap the main return statement?Or could you make
filterFunc
aconst
and use a try / catch?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, flow cannot detect early returns statically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a force cast instead, looks slightly cleaner.