Bug description
When renaming a SQL Lab tab via the tab context menu, the application uses the
browser's native prompt() dialog instead of a styled modal component consistent
with the rest of the Superset UI.
The relevant code in SqlEditorTabHeader/index.tsx even has a TODO comment
acknowledging this:
// TODO: Replace native prompt with a proper modal dialog
Steps to reproduce
- Open SQL Lab
- Click the ⋮ (three dots) menu on any query tab
- Click "Rename tab"
- Observe the native browser prompt dialog appears
Expected behavior
A styled Superset modal dialog (using the existing Modal component) should appear,
consistent with how other rename/edit operations work in the application.
Actual behavior
A native browser prompt() dialog appears. This cannot be styled, is blocked in
some environments, and breaks the visual consistency of the app.
Environment
- Superset version: latest (master)
- Browser: any
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
File: superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
Function: renameTab()
Checklist
Bug description
When renaming a SQL Lab tab via the tab context menu, the application uses the
browser's native
prompt()dialog instead of a styled modal component consistentwith the rest of the Superset UI.
The relevant code in
SqlEditorTabHeader/index.tsxeven has a TODO commentacknowledging this:
// TODO: Replace native prompt with a proper modal dialog
Steps to reproduce
Expected behavior
A styled Superset modal dialog (using the existing
Modalcomponent) should appear,consistent with how other rename/edit operations work in the application.
Actual behavior
A native browser
prompt()dialog appears. This cannot be styled, is blocked insome environments, and breaks the visual consistency of the app.
Environment
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
File:
superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsxFunction:
renameTab()Checklist