tien238lnd commented on code in PR #45176:
URL: https://github.com/apache/superset/pull/45176#discussion_r4441910609
##########
superset-frontend/src/pages/DatasetList/index.tsx:
##########
@@ -517,6 +517,10 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
setLastFetchConfig(config);
setLoading(true);
const { pageIndex, pageSize, sortBy, filters: filterValues } = config;
+ // The Source control and the semantic-layer connections only exist with
+ // SEMANTIC_LAYERS on, but a saved URL can still carry them. The dataset
API
+ // rejects both, and with the control hidden the user could not clear
them.
+ const semanticLayersEnabled = isFeatureEnabled(SEMANTIC_LAYERS_FLAG);
Review Comment:
Done in b9c3b275c5: The saved `Type = Semantic View` is now dropped from the
request when `SEMANTIC_LAYERS` is off and cleared from the filter state, like
the `sl:` connection. A third saved-URL test mounts the page with
`sql:semantic_view` and asserts nothing reaches `/api/v1/dataset/` (it failed
before the change).
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
##########
superset-frontend/src/pages/DatasetList/index.tsx:
##########
@@ -542,7 +546,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
sourceTypeFilter?.value && typeof sourceTypeFilter.value === 'object'
? (sourceTypeFilter.value as { value: string }).value
: (sourceTypeFilter?.value as string | undefined);
- if (sourceTypeValue) {
+ if (sourceTypeValue && semanticLayersEnabled) {
Review Comment:
Done in b9c3b275c5: `currentSourceFilter` now returns `''` when
`SEMANTIC_LAYERS` is off, so a saved Source no longer empties the Database
options. The saved-Source test now also opens the Database control and picks a
database, and asserts the dataset request carries the `database` filter (it
could not find any option before the change).
_🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
--
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]