You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "anumukul (via GitHub)" <gi...@apache.org> on 2026/01/06 10:57:28 UTC
[PR] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
anumukul opened a new pull request, #36923:
URL: https://github.com/apache/superset/pull/36923
### SUMMARY
Fixes #36806
This PR fixes a regression where offset metrics (time comparisons like "1 year ago") were not displayed as dashed lines when charts have no dimensions.
**Root Cause:**
The `isDerivedSeries` function only applied dashed styling when `comparison_type === "Values"`, and `hasTimeOffset` didn't detect series where the name exactly matched a time offset (which happens when there are no dimensions).
**Changes:**
- Removed the restrictive `comparison_type === "Values"` check in `isDerivedSeries.ts`
- Added exact match handling in `timeOffset.ts` for dimension-less charts
- Updated tests to reflect new behavior
### BEFORE/AFTER
**BEFORE**
<img width="848" height="493" alt="image" src="https://github.com/user-attachments/assets/ede17d65-3f65-4140-adf9-689351702c65" />
**AFTER **
<img width="830" height="693" alt="image" src="https://github.com/user-attachments/assets/05de1656-c8cf-47fc-8194-a25f81ea59b5" />
### TESTING INSTRUCTIONS
1. Create a new Line Chart
2. Select a dataset with a time column (e.g., `birth_names` with `ds`)
3. Add a metric (e.g., `COUNT(*)`)
4. Set Time Range to a valid range (e.g., `2005-01-01 to 2008-12-31`)
5. In Advanced Analytics, add Time Comparison: `1 year ago`
6. **Do NOT add any dimensions** (leave Dimensions empty)
7. Click "Update Chart"
8. Verify the offset metric line (`1 year ago`) appears **dashed**, not solid
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #36806
- [ ] Required feature flags: None
- [x] Changes UI
- [ ] Includes DB Migration
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3879945227
Superset uses Git pre-commit hooks courtesy of [pre-commit](https://pre-commit.com/). To install run the following:
```
pip3 install -r requirements/development.txt
pre-commit install
```
A series of checks will now run when you make a git commit.
Alternatively it is possible to run pre-commit by running pre-commit manually:
```
pre-commit run --all-files
```
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3714269370
CodeAnt AI finished reviewing your 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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark closed pull request #36923: fix(viz): display offset metrics as dashed lines regardless of compar…
URL: https://github.com/apache/superset/pull/36923
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3792476978
Please rebase and address the pre-commit fixes, and we'll be happy to merge.
Superset uses Git pre-commit hooks courtesy of [pre-commit](https://pre-commit.com/). To install run the following:
```
pip3 install -r requirements/development.txt
pre-commit install
```
A series of checks will now run when you make a git commit.
Alternatively it is possible to run pre-commit by running pre-commit manually:
```
pre-commit run --all-files
```
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3714268008
## Nitpicks 🔍
<table>
<tr><td>🔒 <strong>No security issues identified</strong></td></tr>
<tr><td>⚡ <strong>Recommended areas for review</strong><br><br>
- [ ] <a href='https://github.com/apache/superset/pull/36923/files#diff-b8fd4567cad703641ee47670bb32dbe0e32621d0e8ac51fecbc9ba1cd161b4a3R23-R29'><strong>Behavioral change</strong></a><br>The removed guard that required `comparison_type === ComparisonType.Values` means any chart with a `time_compare` entry may now mark series as derived. Verify this doesn't enable dashed styling for other comparison types unintentionally. Confirm desired behavior across all supported `comparison_type` values.<br>
- [ ] <a href='https://github.com/apache/superset/pull/36923/files#diff-42b0621f739b90a1a96c99c08d34ca095dca4259166d71586692c96c74407e6aR34-R39'><strong>getTimeOffset guard</strong></a><br>The exported helper `getTimeOffset` assumes `series.name` is a string (it calls `.includes`), but it has no internal type guard. While `hasTimeOffset` now checks the type before calling it, other call sites could call `getTimeOffset` directly and trigger a runtime error if `series.name` is undefined or non-string. Consider making `getTimeOffset` defensive about `series.name` or narrow its parameter type.<br>
- [ ] <a href='https://github.com/apache/superset/pull/36923/files#diff-e32524f85caf42e0e6cb07a5a75fb37b523fda23f6a15e26608df3b76c12a4fcR36-R44'><strong>Behavior change</strong></a><br>Removing the restriction that only ComparisonType.Values marks a derived series means series whose names match time offsets will now be treated as derived regardless of the configured comparison_type. This can change visual styling (dashed vs solid lines) in other comparison modes; verify this is intended across chart types and UI surface.<br>
- [ ] <a href='https://github.com/apache/superset/pull/36923/files#diff-42b0621f739b90a1a96c99c08d34ca095dca4259166d71586692c96c74407e6aR34-R40'><strong>Matching robustness</strong></a><br>The new exact-match check (`timeCompare.includes(series.name)`) in `hasTimeOffset` fixes a regression but can still miss matches due to leading/trailing whitespace or minor formatting differences. Also, logic is split between `getTimeOffset` (pattern matches) and `hasTimeOffset` (exact match), which may lead to maintenance churn. Consider centralizing and normalizing comparisons (trim/case) and consolidating matching logic.<br>
- [ ] <a href='https://github.com/apache/superset/pull/36923/files#diff-e32524f85caf42e0e6cb07a5a75fb37b523fda23f6a15e26608df3b76c12a4fcR8-R12'><strong>Viz type clarity</strong></a><br>The shared `formData` uses `VizType.Table`. The regression being fixed relates to charts with no dimensions (e.g. line charts); confirm tests reflect the intended chart type or add explicit tests for relevant viz types so behavior for dimension-less charts is validated.<br>
</td></tr>
</table>
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "iercan (via GitHub)" <gi...@apache.org>.
iercan commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3876635188
Sorry I don't have any UI development experience on superset
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3718511481
CodeAnt AI is running Incremental review
---
### Thanks for using CodeAnt! 🎉
We're free for open-source projects. if you're enjoying it, help us grow by sharing.
[Share on X](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
[Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3875950488
@anumukul would you still be willing to get this across the finish line? It's so close!
@iercan was just commenting about the linked issue being important. @iercan if @anumukul doesn't finish this up, you're welcome to "adopt" the work on a new 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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed pull request #36923: fix(viz): display offset metrics as dashed lines regardless of compar…
URL: https://github.com/apache/superset/pull/36923
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "anumukul (via GitHub)" <gi...@apache.org>.
anumukul commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3876641973
It will be done by end of the day > @anumukul would you still be willing to get this across the finish line? It's so close!
>
> @iercan was just commenting about the linked issue being important. @iercan if @anumukul doesn't finish this up, you're welcome to "adopt" the work on a new 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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3718721042
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3910853168
Looks like we need a rebase too.
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-4129592375
This issue has been already resolved by https://github.com/apache/superset/issues/37135
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3714260510
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] fix(viz): display offset metrics as dashed lines regardless of compar… [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 #36923:
URL: https://github.com/apache/superset/pull/36923#discussion_r2664543395
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts:
##########
@@ -17,22 +17,13 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
-import {
- ensureIsArray,
- JsonObject,
- QueryFormData,
- ComparisonType,
-} from '@superset-ui/core';
+import { ensureIsArray, JsonObject, QueryFormData } from '@superset-ui/core';
import { hasTimeOffset } from './timeOffset';
export const isDerivedSeries = (
series: JsonObject,
formData: QueryFormData,
): boolean => {
- const comparisonType = formData.comparison_type;
- if (comparisonType !== ComparisonType.Values) {
- return false;
- }
const timeCompare: string[] = ensureIsArray(formData?.time_compare);
Review Comment:
**Suggestion:** `ensureIsArray` can return non-string elements; asserting the result as `string[]` without filtering may pass non-strings into `hasTimeOffset` and cause logic/runtime issues—filter the array to only strings to guarantee the expected type. [type error]
**Severity Level:** Minor ⚠️
```suggestion
const timeCompare = ensureIsArray(formData?.time_compare).filter((v): v is string => typeof v === 'string');
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
The suggestion tightens runtime/type-safety: ensureIsArray can legally return values of any type, so narrowing/filtering to strings before passing to hasTimeOffset avoids surprising runtime behavior or type-unsafe assumptions. The proposed type guard `.filter((v): v is string => typeof v === 'string')` is correct and improves robustness.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts
**Line:** 27:27
**Comment:**
*Type Error: `ensureIsArray` can return non-string elements; asserting the result as `string[]` without filtering may pass non-strings into `hasTimeOffset` and cause logic/runtime issues—filter the array to only strings to guarantee the expected type.
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.
```
</details>
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts:
##########
@@ -36,7 +36,7 @@ export const hasTimeOffset = (
timeCompare: string[],
): boolean =>
typeof series.name === 'string'
- ? !!getTimeOffset(series, timeCompare)
+ ? !!getTimeOffset(series, timeCompare) || timeCompare.includes(series.name)
: false;
Review Comment:
**Suggestion:** Performance bug: calling `getTimeOffset` (which scans `timeCompare`) and then calling `timeCompare.includes(...)` performs two separate linear scans over `timeCompare`; compute the offset once and reuse the result to avoid the duplicate O(n) work. [performance]
**Severity Level:** Minor ⚠️
```suggestion
): boolean => {
if (typeof series.name !== 'string') return false;
const foundOffset = getTimeOffset(series, timeCompare);
if (foundOffset) return true;
return Array.isArray(timeCompare) && timeCompare.includes(series.name);
};
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
Calling getTimeOffset (which iterates timeCompare) and then timeCompare.includes(...) results in two linear scans. Caching the result of getTimeOffset and reusing it avoids the duplicate O(n) work with no behavioral change, so this is a valid micro-optimization.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts
**Line:** 37:40
**Comment:**
*Performance: Performance bug: calling `getTimeOffset` (which scans `timeCompare`) and then calling `timeCompare.includes(...)` performs two separate linear scans over `timeCompare`; compute the offset once and reuse the result to avoid the duplicate O(n) work.
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.
```
</details>
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts:
##########
@@ -17,22 +17,13 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
-import {
- ensureIsArray,
- JsonObject,
- QueryFormData,
- ComparisonType,
-} from '@superset-ui/core';
+import { ensureIsArray, JsonObject, QueryFormData } from '@superset-ui/core';
Review Comment:
**Suggestion:** Importing type-only symbols (`JsonObject`, `QueryFormData`) as runtime values can cause bundlers or runtimes to attempt to import non-existent value exports and break at runtime; change them to type-only imports so only `ensureIsArray` is imported as a runtime value. [possible bug]
**Severity Level:** Critical 🚨
```suggestion
import { ensureIsArray } from '@superset-ui/core';
import type { JsonObject, QueryFormData } from '@superset-ui/core';
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
This is a valid, low-risk improvement. JsonObject and QueryFormData are types — changing them to `import type` avoids the (rare) situation where a bundler/transform tries to resolve non-existent runtime exports.
TypeScript will erase types on emit, but using `import type` is the correct, explicit form and prevents problems with transpilers that don't strip types the same way. There's no functional change and it's a safe compile-time hygiene fix.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/isDerivedSeries.ts
**Line:** 20:20
**Comment:**
*Possible Bug: Importing type-only symbols (`JsonObject`, `QueryFormData`) as runtime values can cause bundlers or runtimes to attempt to import non-existent value exports and break at runtime; change them to type-only imports so only `ensureIsArray` is imported as a runtime value.
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.
```
</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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-4041405353
It looks like the issue was fixed by https://github.com/apache/superset/pull/37135
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-4041396325
Can we close this PR given that https://github.com/apache/superset/pull/37135 was merged?
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3714260115
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](https://twitter.com/intent/tweet?text=Just%20tried%20%40CodeAntAI%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A&url=https%3A//codeant.ai) ·
[Reddit](https://www.reddit.com/submit?title=Check%20out%20CodeAnt%20for%20automated%20code%20review&text=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos.%20Worth%20checking%20out%3A%20https%3A//codeant.ai) ·
[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcodeant.ai&mini=true&title=Check%20out%20CodeAnt%20for%20automated%20code%20review&summary=Just%20tried%20CodeAnt%20for%20automated%20code%20review%20and%20I%27m%20impressed%21%20Free%20for%20open%20source%20with%20a%20free%20trial%20for%20private%20repos)
--
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] fix(viz): display offset metrics as dashed lines regardless of compar… [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #36923:
URL: https://github.com/apache/superset/pull/36923#issuecomment-3714260181
### <span aria-hidden="true">👷</span> Deploy Preview for *superset-docs-preview* processing.
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 845701eefc75961a33be499c6ab77bbec603ee02 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/695cea981190d60008f288ce |
--
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