You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/07/08 01:07:13 UTC

[PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

rusackas opened a new pull request, #41871:
URL: https://github.com/apache/superset/pull/41871

   ### SUMMARY
   
   Emotion template-literal styles — ``css`...` `` and ``styled.x`...` `` — are opaque strings as far as TypeScript is concerned, so invalid CSS inside them is silently dropped by the browser at runtime with nothing to catch it at build time. That's exactly how the `verticalalign: middle` typo fixed in #41052 slipped in: a valid property mangled into an unknown one, ignored by every browser and every tool we run.
   
   Emotion's own ESLint plugin (`@emotion/eslint-plugin`) doesn't help here — it only covers import and syntax-preference hygiene, not CSS property validity. Object styles (`css({ verticalAlign })`) get `csstype` checking for free, but template-literal styles get none, and we use template literals everywhere.
   
   This PR adds **Stylelint** with the [`postcss-styled-syntax`](https://github.com/hudochenkov/postcss-styled-syntax) custom syntax so the CSS *inside* those template literals is actually parsed and linted. The rule set is deliberately scoped to high-signal, low-noise checks rather than a full `stylelint-config-standard` (which would bury us in style-opinion noise):
   
   - `property-no-unknown` — the rule that would have caught #41052
   - `unit-no-unknown`, `function-no-unknown`, `color-no-invalid-hex`, `named-grid-areas-no-invalid`, `string-no-newline`
   - `no-invalid-double-slash-comments` — `//` isn't valid CSS; it only "works" because stylis strips it
   - `declaration-block-no-duplicate-properties` (allowing consecutive fallbacks) — catches declarations silently overriding each other
   
   It's wired into the frontend lint pipeline the same way `oxlint`/custom-rules are: a `stylelint`/`stylelint-fix` npm script, inclusion in `lint:full`, and a `stylelint-frontend` pre-commit hook.
   
   **Baseline cleanup** (to make the gate green — no functional/visual change):
   - Converted `//` line comments inside CSS template literals to `/* */` across ~23 files.
   - Fixed 6 duplicate declarations that were silently overriding each other (`white-space`, `color`, `padding`, `cursor`, `vertical-align`, `background-repeat`). The overridden (dead) declaration was removed, preserving rendered output.
   - `.stylelintignore`s 4 files whose template literals nest a `css` tag inside an interpolation (`styled(X)\`${p => css\`...\`}\``), a pattern `postcss-styled-syntax` can't parse yet.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — no visual change. The baseline fixes preserve rendered output (dead/overridden declarations and inert comments only).
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npm run stylelint          # passes clean on the whole tree
   ```
   
   To see it catch a bug, drop `verticalalign: middle;` into any ``css`...` `` block and re-run — it reports `Unexpected unknown property "verticalalign"`. The `stylelint-frontend` pre-commit hook runs the same check on staged files.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   - [x] Other: adds a frontend linter (Stylelint for CSS-in-JS) + tooling
   
   Follow-up worth considering: the 4 ignored files point at a real `postcss-styled-syntax` limitation with `css`-in-interpolation; if that pattern gets refactored (or the syntax gains support) they can come off the ignore list. A couple of the unparseable files also have genuinely stray `}` braces that stylis tolerates — left alone here to keep this PR about the tooling.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4951901170

   **Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3540602423


##########
.rat-excludes:
##########
@@ -7,6 +7,8 @@
 .codecov.yml
 .eslintrc
 .eslintignore
+.stylelintrc.json
+.stylelintignore

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Path mismatch in excludes</b></div>
   <div id="fix">
   
   Entries `.stylelintrc.json` and `.stylelintignore` don't match actual paths. The files exist at `superset-frontend/.stylelintrc.json` and `superset-frontend/.stylelintignore`. Per the file header (line 1), patterns apply to single files/directories, not full paths — so root-level patterns will never match files inside subdirectories.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #5e009f</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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3552405863


##########
superset-frontend/package.json:
##########
@@ -358,6 +361,7 @@
     "speed-measure-webpack-plugin": "^1.6.0",
     "storybook": "10.4.6",
     "style-loader": "^4.0.0",
+    "stylelint": "^16.26.1",

Review Comment:
   Fair, bumped to 17.14.0. Backward compatible with the hidden `.stylelintrc.json` we already have, and the full glob still runs clean.



##########
superset-frontend/src/SqlLab/components/ResultSet/index.tsx:
##########
@@ -138,7 +138,6 @@ const ResultlessStyles = styled.div`
 // but wrapping text too so text doesn't overflow
 const MonospaceDiv = styled.div`
   font-family: ${({ theme }) => theme.fontFamilyCode};
-  white-space: pre;

Review Comment:
   Intentional, it's a duplicate.  was declared after  in the same rule, so it was already winning, the  line was just dead weight  caught.



##########
superset-frontend/src/SqlLab/components/ResultSet/index.tsx:
##########
@@ -138,7 +138,6 @@ const ResultlessStyles = styled.div`
 // but wrapping text too so text doesn't overflow
 const MonospaceDiv = styled.div`
   font-family: ${({ theme }) => theme.fontFamilyCode};
-  white-space: pre;

Review Comment:
   Intentional, it's a duplicate. `pre-wrap` was declared after `pre` in the same rule, so it was already winning; the `pre` line was just dead weight the duplicate-properties rule caught.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3565551327


##########
superset-frontend/src/explore/components/ControlPanelsContainer.tsx:
##########
@@ -152,8 +152,8 @@ const Styles = styled.div`
   display: flex;
   flex-direction: column;
 
-  // Resizable add overflow-y: auto as a style to this div
-  // To override it, we need to use !important
+  /* Resizable add overflow-y: auto as a style to this div */

Review Comment:
   Fixed — was `Resizable add`, should be `Resizable adds`.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #41871:
URL: https://github.com/apache/superset/pull/41871


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3544938388


##########
superset-frontend/package.json:
##########
@@ -358,6 +361,7 @@
     "speed-measure-webpack-plugin": "^1.6.0",
     "storybook": "10.4.6",
     "style-loader": "^4.0.0",
+    "stylelint": "^16.26.1",

Review Comment:
   currently, s[tylelint v17 is the latest](https://github.com/stylelint/stylelint/releases/tag/17.14.0). Let's strive for currency :D



##########
superset-frontend/.stylelintrc.json:
##########
@@ -0,0 +1,16 @@
+{

Review Comment:
   IMO, let's have the config to be non-hidden for better discoverability and in fact, since v17, non-hidden config file to be the go-to approach.



##########
superset-frontend/src/features/home/SavedQueries.tsx:
##########
@@ -88,7 +88,6 @@ export const CardStyles = styled.div`
     display: inline-block;
     width: 100%;
     height: 179px;
-    background-repeat: no-repeat;

Review Comment:
   Ditto on whether this is intentional



##########
superset-frontend/src/SqlLab/components/ResultSet/index.tsx:
##########
@@ -138,7 +138,6 @@ const ResultlessStyles = styled.div`
 // but wrapping text too so text doesn't overflow
 const MonospaceDiv = styled.div`
   font-family: ${({ theme }) => theme.fontFamilyCode};
-  white-space: pre;

Review Comment:
   Is the deletion here intentional? `white-space: pre` is a valid combo, iirc.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3540737418


##########
superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx:
##########
@@ -313,7 +313,7 @@ const ScopeSelector = styled.div`
           display: block;
         }
 
-        // disable style from react-checkbox-trees.css
+        /* disable style from react-checkbox-trees.css */

Review Comment:
   Good catch, fixed — was `react-checkbox-trees.css`, should be `react-checkbox-tree.css`.



##########
.rat-excludes:
##########
@@ -7,6 +7,8 @@
 .codecov.yml
 .eslintrc
 .eslintignore
+.stylelintrc.json
+.stylelintignore

Review Comment:
   These match by filename, not full path — same as the `.eslintrc`/`.eslintignore` entries right above them (which also live in `superset-frontend/`, not root). The header comment in `.rat-excludes` calls this out explicitly.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3540596497


##########
superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx:
##########
@@ -313,7 +313,7 @@ const ScopeSelector = styled.div`
           display: block;
         }
 
-        // disable style from react-checkbox-trees.css
+        /* disable style from react-checkbox-trees.css */

Review Comment:
   **Suggestion:** The inline comment references a non-existent stylesheet name (`react-checkbox-trees.css`), while this component actually uses `react-checkbox-tree.css`; this typo makes maintenance/debugging harder when tracing where the overridden styles come from. Update the comment to the correct file name. [typo]
   
   <details>
   <summary><b>Severity Level:</b> Minor 🧹</summary>
   
   ```mdx
   ⚠️ Misleading comment hinders locating source CSS overrides file.
   ⚠️ Future maintainers may search nonexistent `react-checkbox-trees.css` path.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open
   `/workspace/superset/superset-frontend/src/dashboard/components/filterscope/treeIcons.tsx`
   and observe at line 20 (from grep output) the import `import
   'react-checkbox-tree/lib/react-checkbox-tree.css';`, confirming the actual stylesheet name
   is `react-checkbox-tree.css`.
   
   2. Open
   `/workspace/superset/superset-frontend/src/dashboard/components/filterscope/FilterScopeSelector.tsx`
   around lines 295–334 and locate the comment at line 316: `/* disable style from
   react-checkbox-trees.css */`.
   
   3. Compare the two files and note the mismatch: the comment in `FilterScopeSelector.tsx`
   refers to `react-checkbox-trees.css` (with an extra “s”), while the only stylesheet
   actually used by this filterscope feature is `react-checkbox-tree.css` imported in
   `treeIcons.tsx:20`.
   
   4. Consider a developer debugging checkbox tree hover styles in `ScopeSelector` who
   follows the comment and searches the repo for `react-checkbox-trees.css` (e.g., via grep);
   they will find no matching stylesheet, making it harder to trace that these overrides
   correspond to `react-checkbox-tree/lib/react-checkbox-tree.css` and causing unnecessary
   confusion during maintenance.
   ```
   </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=36e6991102414ae9ae8b6c6fb368f55d&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=36e6991102414ae9ae8b6c6fb368f55d&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/src/dashboard/components/filterscope/FilterScopeSelector.tsx
   **Line:** 316:316
   **Comment:**
   	*Typo: The inline comment references a non-existent stylesheet name (`react-checkbox-trees.css`), while this component actually uses `react-checkbox-tree.css`; this typo makes maintenance/debugging harder when tracing where the overridden styles come from. Update the comment to the correct file name.
   
   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%2F41871&comment_hash=897f9efddb65965ae65a74351d1cd73051c3b5fe70afcb0bb2160dbd7278c7f8&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41871&comment_hash=897f9efddb65965ae65a74351d1cd73051c3b5fe70afcb0bb2160dbd7278c7f8&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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4911550593

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **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 <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3565551730


##########
superset-frontend/.stylelintrc.json:
##########
@@ -0,0 +1,16 @@
+{

Review Comment:
   Done — renamed to `stylelint.config.js` (non-hidden, and among the supported names since v17). Kept it as JS/`module.exports` since that's the only non-hidden option cosmiconfig looks for; there's no non-hidden JSON variant.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4910479492

   <!-- Bito Reply -->
   The review comment correctly identifies a typo in an inline comment within `FilterScopeSelector.tsx`. The comment refers to `react-checkbox-trees.css`, while the actual stylesheet used is `react-checkbox-tree.css`. Correcting this typo improves maintainability by ensuring developers can accurately locate the source of style overrides. As the file `FilterScopeSelector.tsx` is not present in the provided PR diff, I cannot implement the fix directly. Please update the comment in `FilterScopeSelector.tsx` at line 316 to reference `react-checkbox-tree.css` instead of `react-checkbox-trees.css`.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4949775383

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **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 <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3540738376


##########
.rat-excludes:
##########
@@ -7,6 +7,8 @@
 .codecov.yml
 .eslintrc
 .eslintignore
+.stylelintrc.json
+.stylelintignore

Review Comment:
   <!-- Bito Reply -->
   The suggestion is correct regarding the path matching behavior of the file. Since the patterns in this file are applied as simple matches rather than full paths, adding the root-level filenames will not correctly exclude the files located within the subdirectory. You should update the entries to include the subdirectory prefix to ensure they are properly excluded.
   
   **.rat-excludes**
   ```
   +superset-frontend/.stylelintrc.json
   +superset-frontend/.stylelintignore
   ```



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4910457809

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4910516340

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41871?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 63.86%. Comparing base ([`9617155`](https://app.codecov.io/gh/apache/superset/commit/96171552890979a9a12317c357b130190320d2c6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e76b708`](https://app.codecov.io/gh/apache/superset/commit/e76b70823e19464bb19ee817be700227af5ed6be?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #41871      +/-   ##
   ==========================================
   - Coverage   64.65%   63.86%   -0.80%     
   ==========================================
     Files        2702     2702              
     Lines      150137   150141       +4     
     Branches    34561    34563       +2     
   ==========================================
   - Hits        97070    95881    -1189     
   - Misses      51285    52487    +1202     
   + Partials     1782     1773       -9     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.08% <ø> (-0.01%)` | :arrow_down: |
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.75% <100.00%> (+<0.01%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.60% <ø> (-0.01%)` | :arrow_down: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.38% <ø> (-1.66%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.23% <ø> (-0.01%)` | :arrow_down: |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/41871/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41871?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #41871:
URL: https://github.com/apache/superset/pull/41871#issuecomment-4926135052

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 964e5c220c48ed993930c14ba6590d529d4d615a |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a4fb05cfaabe10009201966 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-41871--superset-docs-preview.netlify.app](https://deploy-preview-41871--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQxODcxLS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.-77DnRGdlLVzVbVg5_M4UXjmhixBe_rat4D3QNWMkPo)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpBCoAgEADAv-w5aY0S7Ac9Y7WVDFNRLxL9PW9zmBdySU9usANMYApFew07pjbX1gMHH5uwtQofxV3HOTmH1I9zLEWrM7hZR2RYIqJeUGql4PsB) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-41871--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3552407576


##########
superset-frontend/src/features/home/SavedQueries.tsx:
##########
@@ -88,7 +88,6 @@ export const CardStyles = styled.div`
     display: inline-block;
     width: 100%;
     height: 179px;
-    background-repeat: no-repeat;

Review Comment:
   Same story, exact duplicate of `background-repeat: no-repeat` a few lines up in the same rule. Removing it changes nothing.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(frontend): lint Emotion CSS-in-JS with Stylelint [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #41871:
URL: https://github.com/apache/superset/pull/41871#discussion_r3565316568


##########
superset-frontend/src/explore/components/ControlPanelsContainer.tsx:
##########
@@ -152,8 +152,8 @@ const Styles = styled.div`
   display: flex;
   flex-direction: column;
 
-  // Resizable add overflow-y: auto as a style to this div
-  // To override it, we need to use !important
+  /* Resizable add overflow-y: auto as a style to this div */

Review Comment:
   **Suggestion:** The new comment has an obvious typo (`Resizable add`) that should be corrected to avoid confusion when documenting why `!important` is required here. [typo]
   
   <details>
   <summary><b>Severity Level:</b> Minor 🧹</summary>
   
   ```mdx
   - ⚠️ Comment typo may confuse maintainers reading overflow rationale.
   - ⚠️ Suggestion addresses non-issue; functionality already intentional.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open
   `/workspace/superset/superset-frontend/src/explore/components/ControlPanelsContainer.tsx`
   and locate the `Styles = styled.div` definition, around tool lines 9–18 (corresponding to
   PR hunk line 155).
   
   2. Observe the comment at tool line 16: `/* Resizable add overflow-y: auto as a style to
   this div */`, which matches the PR diff line `155 /* Resizable add overflow-y: auto as a
   style to this div */`.
   
   3. Confirm that this text is a plain comment, not code; the actual behavior comes from the
   following CSS rule `overflow: visible !important;` (tool line 18), so the typo has no
   effect on runtime behavior.
   
   4. Conclude that the suggestion concerns only a cosmetic/documentation typo in a comment
   and does not correspond to a reproducible functional bug.
   ```
   </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=45b2cebd2b854bf08ff305e42e2d8dbf&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=45b2cebd2b854bf08ff305e42e2d8dbf&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/src/explore/components/ControlPanelsContainer.tsx
   **Line:** 155:155
   **Comment:**
   	*Typo: The new comment has an obvious typo (`Resizable add`) that should be corrected to avoid confusion when documenting why `!important` is required here.
   
   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%2F41871&comment_hash=59473490c3ae37ce202b6d7fe0f1a44b083bf729c52740b557e8e1d0696ca7e5&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41871&comment_hash=59473490c3ae37ce202b6d7fe0f1a44b083bf729c52740b557e8e1d0696ca7e5&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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org