debabsah opened a new pull request, #41329: URL: https://github.com/apache/superset/pull/41329
### SUMMARY SQL Lab's tab rename used the native browser `prompt()` dialog, which can't be styled, is blocked in some environments, and is inconsistent with the rest of the UI (the code carried a `// TODO` to replace it). This swaps it for the existing `Modal` component with a text input: the current tab name is prefilled, Enter submits, and Save is disabled when the field is empty. Closes #40401 ### Screenshots Before: <img width="1458" height="901" alt="Screenshot_Before" src="https://github.com/user-attachments/assets/62af034f-3bbe-4ce7-9024-ab4516a125cd" /> After: <img width="1456" height="902" alt="Screenshot_After_1" src="https://github.com/user-attachments/assets/940e1eaf-5566-4736-85bf-10662a551939" /> After (renamed): <img width="1456" height="483" alt="Screenshot_After_2" src="https://github.com/user-attachments/assets/9bad5a26-cbc3-4812-a6f8-13932ced9b8c" /> ### TESTING INSTRUCTIONS 1. Open SQL Lab. 2. On a query tab, open the `⋮` menu and choose "Rename tab". 3. A styled modal appears with the current tab name prefilled. 4. Edit and click Save (or press Enter); the tab title updates. Cancel/close leaves it unchanged. Unit test in `SqlEditorTabHeader.test.tsx` updated to drive the modal instead of the native prompt. ### Note for reviewers Since the rename UI is now an in-page input rather than a native browser prompt, keystrokes in the field can interact with SQL Lab's global keyboard shortcuts in a way the native prompt did not. I noticed one focus interaction while testing and am happy to address it here or in a follow-up, whichever you prefer. ### ADDITIONAL INFORMATION - [x] Has associated issue: Closes #40401 - [x] Changes UI -- 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]
