Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Preserve language in cell actions undo/redo stack #2511

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

wasimsandhu
Copy link
Collaborator

📝 Summary

Fixes #2509.

🔍 Description of Changes

Added language: LanguageAdapterType to state.history, and use this in deleteCell and undoDeleteCell handlers to bring back SQL/Markdown cells appropriately.

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

📜 Reviewers

@akshayka OR @mscolnick

@wasimsandhu wasimsandhu added the bug Something isn't working label Oct 7, 2024
@wasimsandhu wasimsandhu self-assigned this Oct 7, 2024
Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ❌ Failed (Inspect) Oct 8, 2024 1:21am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 1:21am

@wasimsandhu wasimsandhu changed the title fix: Preserve language in undo/redo stack fix: Preserve language in cell actions undo/redo stack Oct 7, 2024
@mscolnick
Copy link
Contributor

I think we should just always pass back the python code to the undo stack, instead of add additional language adapter. It should be a one line change.

@mscolnick mscolnick merged commit acbd574 into main Oct 8, 2024
21 of 22 checks passed
@mscolnick mscolnick deleted the wasim/fix-undo-delete branch October 8, 2024 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cell undo does not preserve cell language
2 participants