learningequality / kolibri-design-system

Kolibri Design System
https://design-system.learningequality.org
31 stars 75 forks source link

Create `KTable` public interface specification #829

Open MisRob opened 1 day ago

MisRob commented 1 day ago

Summary

Create a specification for the KTables public interface that fits our current use cases; scales well to future use-cases; and is readable, simple, and flexible.

Background

In GSoC 2024, @BabyElias introduced a new component, KTable. The focus of GSoC project was a robust a11y and basic documentation of the main parts. This issue tracks a next big step in KTable work.

Output

A detailed written specification of KTable public interface, similar to KImg or KCard specification.

Guidance

(1) Research

See "References".

(2) Create draft specification

and discuss any questions, alternative approaches, and important decisions with the dev team.

(3) Share for feedback

with the dev team.

(4) Incorporate feedback

and open the final GitHub specification issue.

References

GSoC 2024 KTable work

Discussions about the public interface

Future features

TODO @MisRob link designs

EshaanAgg commented 1 day ago

Proposal: Custom Sorting for KTable

Summary

Enhance the KTable component by introducing custom sorting capabilities. These enhancements make sorting more flexible, user-friendly, and extendable for diverse data handling scenarios.


Feature Details

Currently, the KTable component supports sorting by clicking on column headers. We already have the disableBuiltinSorting attribute to disable this feature, but how the data should be sorted when sortable and disableBuiltinSorting are both true is not defined. This proposal aims to address this issue by introducing a new prop, customSort, to allow users to define custom sorting logic.

I propose to add the same alongside the existing changeSort event emission, as now the developer would have the choice of whether he/she just wants to track the sorting requests from the user (via the event) or wants to handle the sorting logic themselves (via the customSort prop).

MisRob commented 1 day ago

Thanks a lot @EshaanAgg!