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

   ### SUMMARY
   
   The dataset editor recommended the legacy `/superset/dashboard/{id}/` path 
even though the frontend router registers `/dashboard/:idOrSlug/`. Update the 
example to the registered route and normalize existing saved legacy dashboard 
Default URLs before passing them to React Router, preserving query strings and 
fragments.
   
   This intentionally handles the known legacy dashboard path rather than 
adding a global fallback for every unmatched frontend URL. A general fallback 
needs broader routing ownership and behavior decisions because the existing 
route detector does not pattern-match parameterized routes; it is better 
handled separately than expanded into this focused compatibility fix.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   **Before:** following the Default URL help text and clicking the dataset 
name navigated to `/superset/dashboard/<id>/`, leaving only the persistent 
navigation bar and a blank page.
   
   **After:** the help text recommends `/dashboard/{id}/`. Existing datasets 
saved with `/superset/dashboard/<id>/` are transparently routed to 
`/dashboard/<id>/`, so the dashboard renders instead of the blank shell.
   
   ### TESTING INSTRUCTIONS
   
   1. Edit a dataset and open the Settings tab; verify Default URL recommends 
`/dashboard/{id}/`.
   2. Save `/superset/dashboard/<valid-dashboard-id>/?standalone=1` as its 
Default URL.
   3. From the Datasets list, click the dataset name.
   4. Verify the dashboard loads at 
`/dashboard/<valid-dashboard-id>/?standalone=1`.
   5. Run:
      - `npm test -- --runInBand 
src/pages/DatasetList/DatasetList.listview.test.tsx 
src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx`
   
   Regression coverage verifies both the canonical help text and navigation of 
a saved legacy URL, including its query string and fragment.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: `PREVENT_UNSAFE_DEFAULT_URLS_ON_DATASET` 
(enabled by default)
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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: [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]

Reply via email to