Feat/Fix : Dataframe element fix and improvements#2845
Open
Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Open
Feat/Fix : Dataframe element fix and improvements#2845Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Conversation
* Improved the Dataframe element by adding filters, sorting, column selection and ablity to select the number of lines to display
Contributor
There was a problem hiding this comment.
5 issues found across 25 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/Elements/Dataframe.tsx">
<violation number="1" location="frontend/src/components/Elements/Dataframe.tsx:78">
P2: Column filter always stores text input, but numeric columns use different filter semantics in TanStack, causing incorrect filtering for number fields.</violation>
<violation number="2" location="frontend/src/components/Elements/Dataframe.tsx:324">
P2: Expanded row details ignore column visibility and reveal hidden column data.</violation>
</file>
<file name="backend/chainlit/translations/zh-TW.json">
<violation number="1" location="backend/chainlit/translations/zh-TW.json:264">
P3: `zh-TW` translation uses a Simplified character in `filterPlaceholder`, causing mixed-script UI text.</violation>
</file>
<file name="backend/chainlit/element.py">
<violation number="1" location="backend/chainlit/element.py:450">
P2: Dataframe now serializes new flags, but Element.from_dict() still lacks a dataframe case and will rebuild these elements as File, losing dataframe type/options when rehydrating from dicts.</violation>
</file>
<file name="backend/chainlit/translations/kn.json">
<violation number="1" location="backend/chainlit/translations/kn.json:261">
P3: The new Kannada translation for `deselectAll` contains a Telugu character (U+0C15) in the middle of the word, resulting in mixed-script, potentially unreadable UI text for kn users.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/chainlit/element.py">
<violation number="1" location="backend/chainlit/element.py:185">
P1: `Element.from_dict()` constructs `Dataframe` without `data`, causing runtime `TypeError` during dataframe deserialization.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was implemented in collaboration with @tonca, many thanks to him !
Summary by cubic
Adds per-column filters, a column visibility menu, a page-size selector, expandable row details, and a clear-filters action to the Dataframe element for easier exploration. Also fixes horizontal overflow in the pagination footer and guards against None data on the backend.
New Features
Dataframe(show_column_visibility=..., show_column_filters=...)and exposed asshowColumnVisibility/showColumnFiltersin@chainlit/react-client.Bug Fixes
data=NoneinDataframe.__post_init__to avoid errors when no data is provided.Written for commit dcd54e6. Summary will update on new commits.