codeant-ai-for-open-source[bot] commented on code in PR #39760:
URL: https://github.com/apache/superset/pull/39760#discussion_r3613188909


##########
superset-frontend/plugins/plugin-chart-cartodiagram/src/components/MapMaxExtentControl/MapMaxExtentViewControl.tsx:
##########
@@ -0,0 +1,156 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { ControlHeader } from '@superset-ui/chart-controls';
+import { t } from '@apache-superset/core/translation';
+import { css, styled } from '@apache-superset/core/theme';
+import { Button, Radio } from 'antd';
+import { FC } from 'react';
+import { mix } from 'polished';
+import { RadioChangeEvent } from 'antd/lib/radio';
+import {
+  MapMaxExtentConfigs,
+  MapMaxExtentConfigsControlProps,
+} from '../../types';
+import MapMaxExtentTag from './MapMaxExtentTag';
+
+export const StyledMaxExtentButton = styled(Button)`
+  ${({ theme }) => css`
+    flex: 1;
+    margin-right: 4px;
+    line-height: 1.5715;
+    border-radius: ${theme.borderRadius}px;
+    background-color: ${theme.colorPrimaryBg};
+    color: ${theme.colorPrimaryText};
+    font-size: ${theme.fontSizeSM}px;
+    font-weight: ${theme.fontWeightStrong};
+    text-transform: uppercase;
+    min-width: ${theme.sizeUnit * 36};

Review Comment:
   **Suggestion:** The `min-width` CSS value is emitted as a unitless number, 
which is invalid for width properties and gets ignored by the browser. Append a 
length unit (for example px) so the button width constraint is actually 
applied. [possible bug]
   
   <details>
   <summary><b>Severity Level:</b> Minor đź§ą</summary>
   
   ```mdx
   - ⚠️ Min-width styling for extent button is not applied.
   - ⚠️ Cartodiagram control UI may appear cramped or inconsistent.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction âś… </b></summary>
   
   ```mdx
   1. Open `StyledMaxExtentButton` in
   
`superset-frontend/plugins/plugin-chart-cartodiagram/src/components/MapMaxExtentControl/MapMaxExtentViewControl.tsx:32-56`;
   note the CSS rule `min-width: ${theme.sizeUnit * 36};` on line 43, which 
expands to a bare
   number (e.g. `min-width: 288;`) without units.
   
   2. Observe that `StyledMaxExtentButton` is rendered in the control body of
   `MapMaxExtentViewControl` at `MapMaxExtentViewControl.tsx:144-150` when 
`extentMode ===
   'CUSTOM'`, providing the "Use current extent" button.
   
   3. Run Superset, open the Explore view for a cartodiagram chart (control 
panel wired via
   
`superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts`),
 switch
   the "Max extent" control to custom mode so that `MapMaxExtentViewControl` 
renders.
   
   4. Inspect the "Use current extent" button in browser dev tools: the 
computed style shows
   the `min-width` declaration as invalid (unitless) and ignored, allowing the 
button to
   shrink below the intended minimum width when the layout is tight.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=9ea8be681c344972b57eac4780e63a2d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=9ea8be681c344972b57eac4780e63a2d&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** 
superset-frontend/plugins/plugin-chart-cartodiagram/src/components/MapMaxExtentControl/MapMaxExtentViewControl.tsx
   **Line:** 43:43
   **Comment:**
        *Possible Bug: The `min-width` CSS value is emitted as a unitless 
number, which is invalid for width properties and gets ignored by the browser. 
Append a length unit (for example px) so the button width constraint is 
actually applied.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39760&comment_hash=cd1c7483d312a4be9f26df260796a264d63720f0d1f689b05fa3043a187b78eb&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39760&comment_hash=cd1c7483d312a4be9f26df260796a264d63720f0d1f689b05fa3043a187b78eb&reaction=dislike'>👎</a>



##########
superset/config.py:
##########
@@ -2442,6 +2442,83 @@ def EMAIL_HEADER_MUTATOR(  # pylint: 
disable=invalid-name,unused-argument  # noq
     },
 }
 
+# Map projections of the datasources. If not provided, only
+# EPSG:3857 and EPSG:4326 are supported. The projection definitions
+# can be found on https://epsg.io in the Proj.4 section and should
+# be added here in following structure:
+#
+# {'EPSG:Code': 'definition'}
+#
+# e.g.
+#
+# {
+#   'EPSG:25832': (
+#       '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m '
+#       '+no_defs +type=crs'
+#   ),
+#   'EPSG:25833': (
+#       '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m '
+#       '+no_defs +type=crs'
+#   ),
+# }
+#
+MAP_PROJECTIONS = {}
+
+# Default layers that will be added to all visualizations of 
plugin-chart-cartodiagram.
+# For a list of supported types, and configuration details see the README.md
+# of plugin-chart-cartodiagram.
+MAP_DEFAULT_LAYERS = [

Review Comment:
   **Suggestion:** The comment contains a clear typo: “extend” should be 
“extent” in this geospatial context, which can mislead readers when configuring 
map extent behavior. [typo]
   
   <details>
   <summary><b>Severity Level:</b> Minor đź§ą</summary>
   
   ```mdx
   - ⚠️ Minor documentation typo; no runtime or UI impact.
   - ⚠️ Potential slight confusion for developers reading config comments.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction âś… </b></summary>
   
   ```mdx
   1. Open `superset/config.py` around the cartodiagram-related configuration 
comments
   (approximately lines 2470-2485 in the new hunk).
   
   2. Locate the comment `# control for specifying a padding around the 
geospatial extend of
   the data`, which describes padding around a map’s spatial coverage.
   
   3. Note that in geospatial terminology the correct noun is “extent” 
(bounding box or
   coverage), while “extend” is the verb form.
   
   4. Because this line is a comment only and not executed, the typo cannot 
cause runtime
   issues but may slightly mislead readers configuring map extent behavior.
   ```
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=612266c49e9243e3a8db52b98ea01a48&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=612266c49e9243e3a8db52b98ea01a48&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/config.py
   **Line:** 2470:2470
   **Comment:**
        *Typo: The comment contains a clear typo: “extend” should be “extent” 
in this geospatial context, which can mislead readers when configuring map 
extent behavior.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39760&comment_hash=62f6ea6db068a174116bda1c653ee4e7663c6973fb49568dc91159c8a55b7d2d&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39760&comment_hash=62f6ea6db068a174116bda1c653ee4e7663c6973fb49568dc91159c8a55b7d2d&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to