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

[Logs UI] Make column configurations reorderable #35736

Closed
weltenwort opened this issue Apr 29, 2019 · 11 comments · Fixed by #41035
Closed

[Logs UI] Make column configurations reorderable #35736

weltenwort opened this issue Apr 29, 2019 · 11 comments · Fixed by #41035
Assignees
Labels
Feature:Logs UI Logs UI feature loe:medium Medium Level of Effort Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0

Comments

@weltenwort
Copy link
Member

weltenwort commented Apr 29, 2019

Summary

At the time of the addition of configurable log columns in #34916, inserting a column in any position but the last was cumbersome. Instead of having to delete the columns after the desired position and adding them again later, there should be an easy way for the user to move a column at any location.

relates to #31463

AC

Mockups

image

@weltenwort weltenwort added discuss v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.2.0 labels Apr 29, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infrastructure-ui

@jasonrhodes
Copy link
Member

Have we considered a library to help with this so that we can do dnd UI in an accessible way? Something like: https://github.com/atlassian/react-beautiful-dnd ?

Alternatively, is @thompsongl working on something for DnD in EUI?

@weltenwort
Copy link
Member Author

EUI already has components that wrap react-beautiful-dnd. I just tried it out and it actually is keyboard accessible 🤯 So we should be fine with option 1.

@jasonrhodes
Copy link
Member

Haha you are 6 steps ahead of me, great. 🎉

@thompsongl
Copy link
Contributor

Nice! I'll be continuing to add additional styles and context hooks to EUI DnD to extend what you get from react-beautiful-dnd. Seems like this use case is straightforward enough, but let me know if you find any functional gaps or room for improvement

@jasonrhodes
Copy link
Member

I updated the ticket to mention EUI drag and drop explicitly. 👍

@Zacqary
Copy link
Contributor

Zacqary commented Jul 11, 2019

This could be difficult if we want the entire column (as opposed to just the headers) to be picked up and dragged when the user moves their mouse. Since the headers and the columns themselves are rendered in entirely different root components, just having the headers be the draggable elements would be easier. I'll start with that implementation, and if the UX isn't good enough we can look into the heavier approach.

@Zacqary
Copy link
Contributor

Zacqary commented Jul 11, 2019

Having some difficulty getting EuiDraggable to play nice with the column headers' flexbox styling. Since it creates a new <div> to wrap them in, it cancels out their ability to flex-grow to the correct width. Unfortunately trying to use styled-components to apply the LogEntryColumn styles directly to EuiDraggable doesn't work because there seems to be a conflict in both EUI and styled-components trying to use context.

I'll look for a workaround.

@simianhacker
Copy link
Member

@Zacqary Have you tried just adding style={{ flexGrow: 1 }} to EuiDraggable?

@Zacqary
Copy link
Contributor

Zacqary commented Jul 11, 2019

@simianhacker That's what I was going for, but it turns out I misinterpreted this ticket and we actually want to just have the column names be draggable in the Config screen, not have the user drag and drop the actual columns themselves.

So that's a simpler task.

@weltenwort
Copy link
Member Author

I added a mockup to the description for clarity. Sorry again for the ambiguity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature loe:medium Medium Level of Effort Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.4.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants