eui icon indicating copy to clipboard operation
eui copied to clipboard

Drag & Drop X Tabs

Open ThomThomson opened this issue 2 years ago • 6 comments

The Presentation team is building a tabs system for Dashboard. This will involve allowing dashboard authors to create, edit, and delete a collection of tabs.

One feature which is missing currently, and could help immensely with our UX is the ability for users to drag and drop to rearrange tabs. If we implement tabs without this feature, we may have to add a separate management flyout to allow the users to rearrange.

ThomThomson avatar Jul 20 '22 14:07 ThomThomson

Hi @ThomThomson,

Do you have any designs for this? Or is there any implementation of the tabs system for Dashboard that we can take a look at?

miukimiu avatar Jul 20 '22 15:07 miukimiu

Hi @miukimiu, there isn't an implementation quite yet, but we do have some designs that @andreadelrio put together in figma.

https://user-images.githubusercontent.com/14276393/180021248-6a2cfd97-ec18-4306-9a69-2221449e282e.mov

Something to note that isn't completely reflected in this early design is that we'd like to have as much of the behaviour inline as possible. As in, the naming / editing of tabs, rearranging, deleting etc.

ThomThomson avatar Jul 20 '22 15:07 ThomThomson

Thanks, @ThomThomson I'll chat with @andreadelrio and we can see how we can support those inline and drag and drop features.

miukimiu avatar Jul 20 '22 16:07 miukimiu

EUI's drag&drop components are a thin wrapper on top of react-beautiful-dnd, which has some limitations for dragging interactive content like buttons and links.

Depending on design requirements, this may be implementable today. I threw a quick code sandbox together merging EUI's tabs & drag&drop->Interactive elements examples; I found that tabs with an href (renders as an anchor instead of button) are draggable without a custom handle, but the better pattern here is probably having the drag handle in all cases.

chandlerprall avatar Jul 20 '22 16:07 chandlerprall

Looks great @chandlerprall! 😍

@andreadelrio and @ThomThomson it would be great if you could then share your final design/implementation so we can consider adding to our Tabs docs as a complex pattern.

miukimiu avatar Jul 21 '22 12:07 miukimiu

Un-answered this as there are some accessibility issues to account for, I'll bring this up at the team sync tomorrow.

chandlerprall avatar Jul 25 '22 15:07 chandlerprall

Just wanted to jump in here and provide some assistance on helping folks re-order their tabs. @ThomThomson would you be able to share your current designs and/or implementation of this?

daveyholler avatar Dec 12 '22 19:12 daveyholler

Hi @daveyholler, we actually don't have any current designs beyond what I shared back in July. The initiative to add Tabs to Dashboard has been postponed for the moment.

The code sandbox that @chandlerprall shows looks and works great for our use case, though I understand that there are some accessibility issues with that design.

In short, there is no urgency at the moment to get this draggable tabs system into Dashboards. The team will be in touch again if this becomes a priority again in the future.

ThomThomson avatar Dec 12 '22 19:12 ThomThomson

Thanks for the update @ThomThomson. In an effort to keep our backlog groomed, I'm going to close this issue for the time being. Feel free to reopen in the future should the need arise.

daveyholler avatar Dec 12 '22 19:12 daveyholler