codeant-ai-for-open-source[bot] commented on code in PR #43870:
URL: https://github.com/apache/superset/pull/43870#discussion_r3939841258
##########
superset-frontend/src/explore/components/controls/DateFilterControl/DateFilterLabel.tsx:
##########
@@ -406,7 +408,12 @@ export default function DateFilterLabel(props:
DateFilterControlProps) {
{...props}
onDescriptionHoverChange={setIsDescriptionHovered}
/>
- {popoverContent}
+ {/* The glyph sits outside the popover trigger so clicking it opens the
+ tooltip rather than the time-range editor. */}
+ <Flex align="center" gap={theme.sizeUnit}>
+ {popoverContent}
+ <PartitionPruningIndicator mapping={props.partitionMapping} />
Review Comment:
Agreed. The standalone control currently receives only the dataset-level
mapping, so it cannot distinguish an active time range from `No filter`, nor
verify that the selected temporal column is `mapped_column`.
The indicator should be gated before rendering, for example:
```tsx
const hasTimeRange = props.value && props.value !== NO_TIME_RANGE;
const isMappedTemporalColumn =
selectedTemporalColumn === props.partitionMapping?.mapped_column;
<PartitionPruningIndicator
mapping={
hasTimeRange && isMappedTemporalColumn
? props.partitionMapping
: undefined
}
/>
```
`selectedTemporalColumn` should come from the same datasource/control state
used to generate the temporal predicate (typically `granularity_sqla` or the
effective main datetime column). This ensures the glyph appears only when the
query actually contains the mapped time predicate, and remains hidden for `No
filter` or another temporal column. The adhoc filter paths already perform the
equivalent subject-column check.
--
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]