-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Logs Panel: Table UI - Reordering table columns via drag-and-drop #79536
Logs Panel: Table UI - Reordering table columns via drag-and-drop #79536
Conversation
Ugh, the above bug is caused by |
…ld, breaking query filters in table cell. Update unit tests
…837/logs-table-ui-column-ordering
Was able to resolve the above bug by passing through the logsFrame before the transformations are applied |
![]() We added the drag icon used in the transformation UI to each selected field allowing users to reorder columns, and removed the percentage from active fields. @niat22 Would love to review this when you have some time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. Overall just some nits, feature works great! 🚀
<div className={styles.columnWrapper} {...provided.droppableProps} ref={provided.innerRef}> | ||
{labelKeys.sort(sortLabels(labels)).map((labelName, index) => ( | ||
<Draggable draggableId={labelName} key={labelName} index={index}> | ||
{(provided: DraggableProvided) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to get a slightly different background color - maybe just secondary? - on the draggable when it's being dragged. Looks like you could use something like this: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/draggable.md#2-snapshot-draggablestatesnapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I played around with it for a bit: this is what I eventually pushed.
https://github.com/grafana/grafana/assets/109082771/addcb91d-cad5-4387-86fd-535f5b687719
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
… of https://github.com/grafana/grafana into gtk-grafana/issues/78837/logs-table-ui-column-ordering
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for the prompt changes 🚀🚀
…afana#79536) * Implement react-beautiful-dnd to facilitate column reordering * Refactoring field display components * Refactoring internal types to better align with Grafana style guide --------- Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
…9536) * Implement react-beautiful-dnd to facilitate column reordering * Refactoring field display components * Refactoring internal types to better align with Grafana style guide --------- Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
What is this feature?
Adding react-beautiful-dnd to field selection UI to facilitate ordering columns in table UI
Why do we need this feature?
The table UI facilities users to make associations between field values; customizing the order of fields is going to provide our users with the flexibility to do just that.
Who is this feature for?
Logs table users in explore
Which issue(s) does this PR fix?:
Fixes #78837
Special notes for your reviewer:
Please check that: