-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Description
Motivation
Currently, navigation logic in Superset is inconsistent. There is a navigationUtils utility that provides centralized navigation functionality, but it is not being used consistently throughout the codebase. In several places, window.open() is called directly instead of using the utility. This inconsistency makes the code harder to maintain and prevents centralized control over navigation behavior. Any changes to navigation logic (e.g., adding tracking, modifying target behavior, or implementing security policies) require updates in multiple locations rather than a single place.
Proposed Change
- Refactor all direct window.open() calls to use the existing navigationUtils utility. This will:
- Centralize navigation logic in one location
- Improve maintainability by providing a single source of truth
- Enable easier future modifications to navigation behavior
- Ensure consistent navigation patterns across the application
The refactoring will involve:
- Auditing the codebase to identify all direct window.open() calls
- Replacing them with appropriate navigationUtils methods
- Extending navigationUtils if needed to cover additional use cases
New or Changed Public Interfaces
No changes to public REST endpoints or data models are required. Changes will be limited to internal navigation patterns within React components and utilities.
New dependencies
None. This proposal uses existing utilities and does not require additional packages.
Migration Plan and Compatibility
This change is backward compatible and requires no database migrations or URL updates. The refactoring can be done incrementally without breaking existing functionality.