rio-labs / rio

WebApps in pure Python. No JavaScript, HTML and CSS needed
https://rio.dev
Apache License 2.0
453 stars 14 forks source link

rio.Table: Exploring Core Features and Styling Options #10

Open Sn3llius opened 1 month ago

Sn3llius commented 1 month ago

Discussed in https://github.com/rio-labs/rio/discussions/9

Originally posted by **Sn3llius** May 12, 2024 The `rio.Table` component serves as a fundamental element in many data-centric applications, facilitating the display and manipulation of tabular data. While it fulfills its basic function, there is potential for significant improvement and expansion to better meet the diverse needs of users. In this discussion, I propose a major overhaul of `rio.Table`, focusing on refining core features and enhancing styling options to elevate its usability and versatility. ## Core Features of Tables: 1. **Data Representation:** Tables should effectively represent tabular data, including features such as sorting, filtering, and pagination for managing large datasets. 2. **Interactivity:** Interactive elements like clickable rows, editable cells, and context menus enhance user interaction and streamline data manipulation tasks. 3. **Accessibility:** Tables should adhere to accessibility standards, ensuring compatibility with screen readers, keyboard navigation, and other assistive technologies. 4. **Customization:** Users should have the ability to customize table appearance and behavior according to their preferences and specific use cases. ## Styling Options: 1. **Themes and Templates:** Offering predefined themes or templates enables users to quickly apply consistent styling across their applications. 2. **Conditional Formatting:** Support for conditional formatting allows users to dynamically style cells based on data values or predefined rules, enhancing data visualization and analysis. ## Proposed Enhancements: 1. **Modular Architecture:** Implement a modular architecture for `rio.Table` to facilitate extensibility and customization, allowing developers to easily add new features or modify existing ones. 2. **Improved Performance:** Optimize table rendering and data manipulation operations to ensure smooth performance, even with large datasets or complex interactions. 3. **Standardized APIs:** Define standardized APIs for common table operations to simplify integration with other libraries and frameworks, promoting interoperability and developer productivity. ## Next Steps: I invite contributions and feedback from the community on the proposed overhaul of `rio.Table`. Specifically, I'm interested in hearing your thoughts on the core features of tables, desirable styling options, and any additional enhancements you believe would be beneficial. Together, we can shape the future of `rio.Table` to better serve the needs of developers and users alike. ## Additional Information: - This discussion aims to foster collaboration and innovation in enhancing the functionality and usability of `rio.Table` within the broader ecosystem of data-centric applications. - Your insights and suggestions are invaluable in guiding the direction of this major overhaul project. Let's work together to make `rio.Table` the go-to solution for tabular data management and visualization.
joegilkes commented 1 month ago

This sounds really great overall. Table layout and styling would be great, and I think it'd allow for a lot more creative uses of tables within Rio as a whole. In particular, it'd be very nice to be able to specify the vertical and horizontal padding of the cells of tables, as well as the vertical and horizontal alignment of whatever is in the cells.

I've only just got started with Rio so I'm not sure if it's technically possible or not right now, but it would also be great to be able to pass rio.Components as the data to be rendered within tables, e.g. rio.Images, rio.Icons, rio.Plots, etc. Not entirely sure how sorting by a table column with those kinds of values would work, but it would be nice to be able to display graphical data in rows alongside text and numbers and then be able to sort by the text/numbers and have their respective graphics be sorted as well.