-
Notifications
You must be signed in to change notification settings - Fork 16k
fix(deckgl): polygon elevation fixed value #35266
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
base: master
Are you sure you want to change the base?
Conversation
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Suboptimal Union Type Design ▹ view | 🧠 Not in scope | |
Missing legacy metric handling in elevation logic ▹ view | 🧠 Not in scope |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/buildQuery.ts | ✅ |
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/transformProps.ts | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
export interface DeckPolygonFormData extends SqlaFormData { | ||
line_column?: string; | ||
line_type?: string; | ||
metric?: string; | ||
point_radius_fixed?: { | ||
value?: string; | ||
}; | ||
point_radius_fixed?: | ||
| { | ||
value?: string; | ||
} | ||
| { | ||
type: 'fix'; | ||
value: string; | ||
} | ||
| { | ||
type: 'metric'; | ||
value: QueryFormMetric; | ||
}; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
if ('type' in point_radius_fixed) { | ||
if ( | ||
point_radius_fixed.type === 'metric' && | ||
point_radius_fixed.value != null | ||
) { | ||
metrics.push(point_radius_fixed.value); | ||
} | ||
} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Pull Request Overview
This PR fixes an issue with deck.gl polygon chart elevation when set to a fixed value. The problem was that fixed elevation values (like "1000") were not being properly handled, resulting in no elevation being applied to polygons.
- Adds proper support for fixed elevation values in the polygon transform props logic
- Updates type definitions to handle both fixed values and metric-based elevation configurations
- Implements comprehensive test coverage for elevation handling scenarios
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
transformProps.ts |
Adds fixed elevation value parsing and conditional logic to prioritize fixed values over metric-based elevation |
transformProps.test.ts |
New comprehensive test suite covering fixed elevation, metric elevation, and edge cases |
buildQuery.ts |
Updates type definitions to support both legacy and new elevation configuration structures |
buildQuery.test.ts |
New comprehensive test suite for query building with various elevation configurations |
point_radius_fixed?: | ||
| { | ||
value?: string; | ||
} | ||
| { | ||
type: 'fix'; | ||
value: string; | ||
} | ||
| { | ||
type: 'metric'; | ||
value: QueryFormMetric; | ||
}; |
Copilot
AI
Sep 25, 2025
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.
The union type has inconsistent nullability for the value
field. The first variant allows value?: string
(optional), while the second variant requires value: string
. This inconsistency could lead to runtime errors. Consider making the value field consistently optional or required across all variants.
Copilot uses AI. Check for mistakes.
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.
The optional value type makes it backward compatible and it's handled properly in Polygon's transformProps and FixedOrMetricControl
SUMMARY
I discovered an issue with the deck.gl polygon chart's elevation when set to a fixed value like "1000". This PR resolves that.
BEFORE/AFTER
Before

After

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION