Skip to content

Conversation

@SamarJyoti496
Copy link
Contributor

@SamarJyoti496 SamarJyoti496 commented Oct 16, 2025

📝 Summary

When pressing Shift+Enter on a SQL cell, the new cell now inherits the SQL type instead of defaulting to Python. This maintains workflow momentum when chaining SQL queries.

Fixes #6790

🔍 Description of Changes

Problem: Shift+Enter on SQL cells created Python cells, breaking the flow.

Solution: Modified moveToNextCell in cells.ts to detect SQL cells and create new SQL cells with default boilerplate.

Changes:

  • Added getNewCellCode() helper that checks cell type using LanguageAdapters.sql.isSupported()
  • SQL cells create SQL cells; Python cells remain empty (unchanged behavior)
  • Added two tests for SQL and Python cell behavior
  • Before: SQL cell → Shift+Enter → Empty Python cell ❌
  • After: SQL cell → Shift+Enter → SQL cell with mo.sql() ✅

📋 Checklist

  • I have read the contributor guidelines.
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@vercel
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Oct 16, 2025 10:53pm

@github-actions
Copy link

github-actions bot commented Oct 16, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@SamarJyoti496
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Light2Dark
Copy link
Contributor

hey @SamarJyoti496 , thanks for the contribution. We are internally discussing how to design this since it changes the default behaviour. Will come back to this in abit.

@SamarJyoti496
Copy link
Contributor Author

hey @SamarJyoti496 , thanks for the contribution. We are internally discussing how to design this since it changes the default behaviour. Will come back to this in abit.

Thanks for the update! Sounds good, happy to wait for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Shift + Enter" on a SQL cell could create a new SQL cell instead

2 participants