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

Add column sizing mode to data editor #4037

Conversation

kacper-paszkowski-airspace-intelligence
Copy link
Contributor

📝 Summary

fix for issue #4034

🔍 Description of Changes

  • add property column_sizing_mode to experimental_data_editor
image image

📋 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

@mscolnick as you're the main contributor in that component

Copy link

vercel bot commented Mar 8, 2025

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

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2025 7:28pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2025 7:28pm

Copy link

github-actions bot commented Mar 8, 2025

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

@kacper-paszkowski-airspace-intelligence
Copy link
Contributor Author

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

@@ -57,6 +57,7 @@ export const DataEditorPlugin = createPlugin<Edits>("marimo-data-editor", {
]),
)
.nullish(),
columnSizingMode: z.enum(["fit", "auto"]).default("fit"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we default to auto?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to maintain previous behavior as default
fit - columns are resized to fit the current view
auto - columns are resized based on content
if it's unclear, naming/default behavior is subject to change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to have opinionated but good defaults. If you think auto is better, then it's ok to make the change instead of keeping the default, since it's still under experimental.

mscolnick
mscolnick previously approved these changes Mar 8, 2025
Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement! One suggestion but I'll defer to you which you think is better

@mscolnick mscolnick merged commit 812a08c into marimo-team:main Mar 8, 2025
32 checks passed
Copy link

github-actions bot commented Mar 8, 2025

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.11.18-dev23

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.

2 participants