Aiven-Open / Aiven-Open/klaw

refactor(coral): Replace existing `SkeletonTable` with more versatile `LoadingTable`

Abierto
#1,432 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Frontend good first issue Housekeeping
Lenguaje dominante
Java
Estrellas
195
Forks
77
Merge medio
8 d 9 h
PR fusionados (30 d)
1

Descripción

## What this is about

This PR https://github.com/aiven/klaw/pull/1431 introduced the `LoadingTable` component, which allows us to generate a flexible skeleton component, with as many columns and rows as we want to give it.

This `LoadingTable` would be very useful in the context of our `TableLayout` component, which is used in many of the pages rendering tables. Currently, `TableLayout` renders `SkeletonTable` as its loading state, which is a static component and may not be suited for all situations. Ideally we would like to render a `LoadingTable` tailored to the amount of columns and rows expected in each context where `TableLayout` is used.

## Possible implementation

- Add a `loadingState` prop to `TableLayout`, which will take an object of type `LoadingTableProps` (https://github.com/aiven/klaw/blob/1af207f024cda92c3b4a593a8663493689d1c8d7/coral/src/app/features/components/layouts/LoadingTable.tsx#L10-L13)
- Render `LoadingTable` instead of `SkeletonTable` in `TableLayout` and pass it `loadingState` as props
- Update all uses of `TableLayout` to pass it the appropriate `loadingState` according the the columns and rows of the rendered table

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.