Skip to content

Conversation

@YousufFFFF
Copy link
Contributor

@YousufFFFF YousufFFFF commented Dec 22, 2025

User description

Summary

Fixes an issue in the Deck.gl Polygon chart where lineWidth was applied even when the Stroked toggle was disabled.

What changed

  • Apply lineWidth only when stroked === true
  • Aligns polygon outline behavior with user expectations and other Deck.gl layers

Before

  • Polygon outlines were rendered even when Stroked was disabled
  • Changing Line width had a visible effect regardless of the toggle state

Demo

Before / After: Line width is now applied only when Stroked is enabled.

https://github.com/user-attachments/assets/294ac366-1496-4a96-9bb1-3407d0277f9c
https://github.com/user-attachments/assets/4ca12fe8-686c-4ec4-b9f0-bab098bed55f

After

  • Polygon outlines are rendered only when Stroked is enabled
  • Line width has no effect when Stroked is disabled

Testing

  • Verified locally using docker-compose-non-dev
  • Confirmed UI behavior by toggling Stroked and adjusting Line width
  • pre-commit checks passed

CodeAnt-AI Description

Respect Stroked toggle when rendering polygon outlines

What Changed

  • Polygon outline width is now applied only when the "Stroked" toggle is enabled
  • When "Stroked" is disabled, polygons render with no outline regardless of the Line width setting
  • Line width units and other polygon behaviors remain unchanged

Impact

✅ Fewer unexpected polygon outlines
✅ Clearer stroke control behavior in chart settings
✅ Consistent polygon rendering between toggles

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai-for-open-source codeant-ai-for-open-source bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Dec 22, 2025
@dosubot dosubot bot added the viz:charts:deck.gl Related to deck.gl charts label Dec 22, 2025
@codeant-ai-for-open-source
Copy link
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Units mismatch
    The change replaces a previous getLineWidth accessor with a lineWidthMinPixels constant that depends on fd.stroked. If fd.line_width_unit can be a unit other than pixels (e.g., 'meters'), lineWidthMinPixels may not be the correct property to control line width in those units — this can cause unexpected behavior for non-pixel units.

  • deck.gl compatibility
    Ensure the chosen properties (lineWidthMinPixels, lineWidthUnits) match the deck.gl version in use. Some versions expect getLineWidth, lineWidthScale, or different combinations to correctly render polygon outlines.

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@bito-code-review bito-code-review bot left a comment

Choose a reason for hiding this comment

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

Code Review Agent Run #dc0c85

Actionable Suggestions - 1
  • superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx - 1
Review Details
  • Files reviewed - 1 · Commit Range: 7d5daff..7d5daff
    • superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Polygon/Polygon.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

getFillColor: colorScaler,
getLineColor: sc ? [sc.r, sc.g, sc.b, 255 * sc.a] : undefined,
getLineWidth: fd.line_width,
lineWidthMinPixels: fd.stroked ? fd.line_width : 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Incorrect deck.gl property usage

Replacing getLineWidth with lineWidthMinPixels changes polygon outline behavior from setting the actual width to only enforcing a minimum pixel width. This can result in thinner lines than expected, especially when fd.line_width differs from the default. Other deck.gl layers in the codebase still use getLineWidth, and deck.gl docs confirm both properties exist but serve different purposes.

Code Review Run #dc0c85


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugins size/XS size:XS This PR changes 0-9 lines, ignoring generated files viz:charts:deck.gl Related to deck.gl charts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant