Skip to content

feat: row expanded view for table data #4787

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

Merged
merged 32 commits into from
May 7, 2025
Merged

Conversation

Light2Dark
Copy link
Collaborator

@Light2Dark Light2Dark commented May 2, 2025

📝 Summary

Popover that displays single row data vertically. By default, it will show all rows in current page. If there is selection, it will show those rows instead.

image

image

Some limitations:

  • The data is limited to whatever page the table is on. Does not persist selections across pages.
  • When you navigate through the page and select/deselect, the index on the page stays the same, meaning you could view different data as you select more rows. We don't keep track of the selected row id as the page number.

Todo:

  • add tanstack table feature (focus row)
  • tests

🔍 Description of Changes

📋 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.

Copy link

vercel bot commented May 2, 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 May 7, 2025 5:05pm

export const DataSelectionPanel: React.FC<{
handleDragging: (isDragging: boolean) => void;
}> = ({ handleDragging }) => {
return <SelectionPanel handleDragging={handleDragging} />;
Copy link
Contributor

Choose a reason for hiding this comment

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

on thing we could look at is making this a "Slot". i created a library @marimo-team/react-slotz which we use in the codebase already - you can look for some existing usage.

this would allow the plugins to do:

{some_custom_ui}

and then {some_custom_ui} can be picked up in this sidebar

Copy link
Contributor

Choose a reason for hiding this comment

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

this would also clean up a lot of the jotai state that is globally shared, but likely shouldnt be

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

really cool approach, thanks for the rec!

@Light2Dark Light2Dark marked this pull request as ready for review May 7, 2025 06:04
mscolnick
mscolnick previously approved these changes May 7, 2025
@mscolnick mscolnick merged commit 4001433 into main May 7, 2025
34 of 37 checks passed
@mscolnick mscolnick deleted the sham/row-expanded-view branch May 7, 2025 17:48
Copy link

github-actions bot commented May 7, 2025

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

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