bito-code-review[bot] commented on code in PR #39760:
URL: https://github.com/apache/superset/pull/39760#discussion_r3291583601


##########
superset-frontend/plugins/plugin-chart-cartodiagram/src/plugin/controlPanel.ts:
##########
@@ -88,6 +94,27 @@ const config: ControlPanelConfig = {
             },
           },
         ],
+        [
+          {
+            name: 'geom_format',
+            config: {
+              type: 'SelectControl',
+              label: t('Geometry Format'),
+              renderTrigger: false,
+              description: t(
+                'The format of the geometry column. GeoJSON columns are 
expected to use WGS84 coordinates. The EWKB and EWKT formats allow for 
arbitrary projections, which will be read from the data.',
+              ),
+              default: GeometryFormat.GEOJSON,
+              choices: [
+                [GeometryFormat.GEOJSON, t('GeoJSON')],
+                [GeometryFormat.WKB, t('EWKB')],
+                [GeometryFormat.WKT, t('EWKT')],
+              ],
+              clearable: false,
+              validators: [validateNonEmpty],
+            },
+          },
+        ],

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing test coverage for new formats</b></div>
   <div id="fix">
   
   The `geom_format` control adds WKB and WKT geometry format options (lines 
108-111), but `transformProps.test.ts` only exercises `GeometryFormat.GEOJSON`. 
The new WKB and WKT code paths in `transformPropsUtil.ts` and `mapUtil.tsx` 
will remain untested.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c40662</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx:
##########
@@ -18,7 +18,6 @@
  */
 import { Icons } from '@superset-ui/core/components/Icons';
 import { Button } from '@superset-ui/core/components';
-import { Tag } from 'src/components';
 import { FC } from 'react';

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>CWE-N/A: Missing Unit Test Coverage</b></div>
   <div id="fix">
   
   The LayerTreeItem component lacks unit test coverage. BITO.md rule [6262] 
requires tests to verify actual behavior (click handlers, rendering structure), 
not just that components render. Without tests, this refactoring removing the 
Tag wrapper creates regression risk that could go undetected.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c40662</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx:
##########
@@ -16,23 +16,41 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import {
+  CheckOutlined,
+  CloseOutlined,
+  UploadOutlined,
+} from '@ant-design/icons';
 import { t } from '@apache-superset/core/translation';
 import { JsonValue } from '@superset-ui/core';
 import { css, styled, useTheme } from '@apache-superset/core/theme';
 // eslint-disable-next-line no-restricted-imports
 import { Button } from '@superset-ui/core/components/Button';
 import { Form } from '@superset-ui/core/components/Form';
 import Tabs from '@superset-ui/core/components/Tabs';
-import { Data as GsData } from 'geostyler-data';
+import { Upload } from 'antd';

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Use @<!-- -->superset-ui/core for Upload</b></div>
   <div id="fix">
   
   Direct antd import at line 31 violates the project's guideline to use 
@superset-ui/core component wrappers. An Upload component wrapper exists in 
@superset-ui/core/components/Upload that re-exports from antd.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c40662</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/webpack.config.js:
##########
@@ -516,7 +516,58 @@ const config = {
       {
         test: /\.jsx?$/,
         // include source code for plugins, but exclude node_modules and test 
files within them
-        exclude: [/superset-ui.*\/node_modules\//, /\.test.jsx?$/],
+        exclude: [
+          /superset-ui.*\/node_modules\//,
+          /\.test.jsx?$/,
+          path.resolve(
+            __dirname,
+            
'./plugins/plugin-chart-cartodiagram/node_modules/geostyler-openlayers-parser',
+          ),
+          path.resolve(
+            __dirname,
+            
'./plugins/plugin-chart-cartodiagram/node_modules/geostyler-legend',
+          ),
+          path.resolve(

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Dead code: non-existent path exclusions</b></div>
   <div id="fix">
   
   These `path.resolve` patterns exclude directories that don't exist in the 
repository (plugin-chart-cartodiagram has no node_modules). Additionally, 
directory paths without trailing wildcards won't match nested files. If these 
exclusions are intended for transitive dependencies of 
geostyler-openlayers-parser, either use RegExp patterns like 
`/plugin-chart-cartodiagram\/node_modules\/(geostyler|d3)/` or remove if not 
applicable.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c40662</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
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