commercetools / ui-kit

Component library 💅
https://uikit.commercetools.com
MIT License
145 stars 25 forks source link

<DataTable> Allow for nested tables #2687

Open jocelyn-dunkley opened 10 months ago

jocelyn-dunkley commented 10 months ago

Is your feature request related to a problem? Please describe.

Pacman team recently released what we call "product list expanded variant table". Essentially using custom CSS to add a nested table within the DataTable. Customers have really liked this new feature. I think there are a couple other teams on the MC who has been interested in having something like this as well.

Describe the solution you'd like A clear and concise description of what you want to happen.

Essentially what we built in the product list but natively in UI-kit. There's a couple small UX issues we can't fix due to the hacky-ness of our solution.

Additional context

Screenshot 2024-01-16 at 11 17 29

### Tasks
ddouglasz commented 10 months ago

Hello @jocelyn-dunkley Thank you for reporting this issue. We will take a look at this up and update you on how we plan to proceed.

jaikumar-tj commented 6 months ago

Hi Team I'll add this here for transparency and also for collaboration from different teams.

As you know, the Pacman team has copied the DataTableManager component to support the Nested Table feature. We are aware of the issues that arise from this divergence of code and the additional re-work required for the copied component.

@tdeekens reminded us about the need to converge the DataTableManager back into ui-kit, including the functionality that ui-kit does not natively provide.

Before we plan our next quarter, we would like to hear your thoughts and opinions about how we can proceed. Based on your input and our available time and resources, we can plan accordingly.

For more context

There are 2 separate issues which are closely related.

  1. Updating <DataTableManager> to support an additional option for the variant column manager.
  2. Updating <DataTable> to support Nested Table. Screenshot 2024-05-31 at 13 00 25

The reason for mentioning those 2 issues together is that they could help us to make decisions based on the how it might affect each other. The convergence of <DataTableManager> will resolve issue 1 from the above list, but issue 2 will remain open since the current implementation is done in FE by adding custom CSS. For instance, If we decide to not support nested table, then we can think of alternate solution rather than convergence (i.e, we can even delete those copied folder and find different solution. This is just an example scenario).

Your insights and thoughts would be valuable for us to understand and align our expectations better.

Open questions

  1. Do you have any concerns regarding the convergence of <DataTableManager> from FE to ui-kit?
  2. Do you have any preferences about what to include, what to leave out, or how to approach it?
  3. Should we focus solely on the convergence of <DataTableManager> and not prioritize supporting Nested Table in ui-kit for now?
  4. Is there anything else you would like to share?

Thank you! cc: @commercetools/first-contact-team-fe, @commercetools/shield-team, @commercetools/pacman-team-fe

CarlosCortizasCT commented 5 months ago

Hi @jaikumar-tj

Thanks a lot for bringing this topic back 🙇

We need to discuss this internally in the team to be able to get to a commitment.

From my initial point of view, I think the most urgent part to address in the DataTableManager since that's the code that is duplicated and I think extending ui-kit's component to address your team's needs will not be difficult.

We'll try to discuss this within the team as soon as we have the time (currently we're busy regarding some off-sites) and get back to you with more info from our side.