This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new a44afd81058 chore: drop legacy /superset prefix from remaining 
hardcoded URLs (#42156)
a44afd81058 is described below

commit a44afd810587c7f021a43f74ce9d6c989859032f
Author: Joe Li <[email protected]>
AuthorDate: Mon Jul 27 14:13:35 2026 -0700

    chore: drop legacy /superset prefix from remaining hardcoded URLs (#42156)
    
    Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
 .../src/vendor/superset/exploreUtils.ts            | 69 ----------------------
 .../preset-chart-deckgl/src/utils/explore.ts       |  2 +-
 superset/migrations/shared/native_filters.py       |  2 +-
 3 files changed, 2 insertions(+), 71 deletions(-)

diff --git 
a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.ts
 
b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.ts
deleted file mode 100644
index 098b3a73f2e..00000000000
--- 
a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/vendor/superset/exploreUtils.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// @ts-nocheck -- vendor file; not fully typed
-/* eslint camelcase: 0 */
-import URI from 'urijs';
-import safeStringify from 'fast-safe-stringify';
-
-const MAX_URL_LENGTH = 8000;
-
-export function getURIDirectory(formData, endpointType = 'base') {
-  // Building the directory part of the URI
-  let directory = '/explore/';
-  if (['json', 'csv', 'query', 'results', 'samples'].includes(endpointType)) {
-    directory = '/superset/explore_json/';
-  }
-
-  return directory;
-}
-
-export function getExploreLongUrl(
-  formData,
-  endpointType,
-  allowOverflow = true,
-  extraSearch = {},
-) {
-  if (!formData.datasource) {
-    return null;
-  }
-
-  const uri = new URI('/');
-  const directory = getURIDirectory(formData, endpointType);
-  const search = uri.search(true);
-  Object.keys(extraSearch).forEach(key => {
-    search[key] = extraSearch[key];
-  });
-  search.form_data = safeStringify(formData);
-  if (endpointType === 'standalone') {
-    search.standalone = 'true';
-  }
-  const url = uri.directory(directory).search(search).toString();
-  if (!allowOverflow && url.length > MAX_URL_LENGTH) {
-    const minimalFormData = {
-      datasource: formData.datasource,
-      viz_type: formData.viz_type,
-    };
-
-    return getExploreLongUrl(minimalFormData, endpointType, false, {
-      URL_IS_TOO_LONG_TO_SHARE: null,
-    });
-  }
-
-  return url;
-}
diff --git a/superset-frontend/plugins/preset-chart-deckgl/src/utils/explore.ts 
b/superset-frontend/plugins/preset-chart-deckgl/src/utils/explore.ts
index 8b8ad24aabe..0d5d6e251c5 100644
--- a/superset-frontend/plugins/preset-chart-deckgl/src/utils/explore.ts
+++ b/superset-frontend/plugins/preset-chart-deckgl/src/utils/explore.ts
@@ -26,7 +26,7 @@ export function getURIDirectory(endpointType = 'base') {
   // Building the directory part of the URI
   let directory = '/explore/';
   if (['json', 'csv', 'query', 'results', 'samples'].includes(endpointType)) {
-    directory = '/superset/explore_json/';
+    directory = '/explore_json/';
   }
 
   return directory;
diff --git a/superset/migrations/shared/native_filters.py 
b/superset/migrations/shared/native_filters.py
index 20cda901c01..26bb7912eac 100644
--- a/superset/migrations/shared/native_filters.py
+++ b/superset/migrations/shared/native_filters.py
@@ -335,7 +335,7 @@ def migrate_dashboard(dashboard: Dashboard) -> None:  # 
noqa: C901
 
                 meta["code"] = dedent(
                     f"""
-                        &#9888; The <a 
href="/superset/slice/{slc.id}/">{slc.slice_name}
+                        &#9888; The <a href="/slice/{slc.id}/">{slc.slice_name}
                         </a> filter-box chart has been migrated to a native 
filter.
                         """
                 )

Reply via email to