Aiven-Open / Aiven-Open/klaw

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

未关闭
#1,432 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Frontend good first issue Housekeeping
主要语言
Java
星标
195
派生
77
平均合并
8 天 9 小时
30 天内合并 PR
1

描述

## 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。