Collaborate?
Hi @archit-p , I just wanted you to know that I'm enjoying the table feature you've built for React. I'm hacking away in a fork, trying to get it to a point where it can be easily installed into an existing React project via npm module. That's my main need right now, because I would hope to use it in a few internal projects for our Mumbai-based company.
Take a look and let me know if you'd be interested in trying to work out a way to merge these together before I deviate from your code base too much. If so, I'd like to hear specifically what it would take in your view to remain compatible with however you're already using it.
https://github.com/koyal-tech/editable-react-table
Warm regards, Jeff
Hi Jeff,
Thank you for your kind words. I'm happy that you're enjoying this project and would like to extend it.
As the code is currently, I believe the Table component can be published as a module and re used in other projects. There are a few things to be mindful of when making this change:
- State management is completely outside the
Tablecomponent and currently usesuseReducer. All the code is written with this in mind, so you might need to make changes if you wish to use a different state management tool and/or move state management inside theTablecomponent itself. I see that you've chosen to introduce theTableWrappercomponent and bring state management into the module itself. - The project uses an older version of Vite and so build is done using Rollup. Vite has since moved to using Esbuild which is faster, so that is something to be explored.
- There are no provisions to change the styling. All styles are written using plain CSS, so this might become an issue when integrating within a larger project with its own style system.
- Finally, there are no tests in the project. This is an area I'm unfamiliar with, however I strongly believe tests would be required for robustness.
I'll be happy to discuss these issues further and to integrate these changes into the project. Feel free to create a PR/more issues with ideas and questions!
Thanks, this is helpful and mostly inline with how I felt after reading the code base. We have a pretty strong unit testing practice at Koyal Tech, and will endeavor to contribute some basics in that regard. 👍
Just so you're aware, I did an MVP to get it modularized and able to import, but I know further enhancements will be required before it is useful enough to merge back in. https://github.com/koyal-tech/editable-react-table (PR 1 might be of interest at a quick glance.. https://github.com/koyal-tech/editable-react-table/pull/1 ) https://www.npmjs.com/package/@koyal-tech/editable-react-table
I have to thank you for your work. This repo inspire me to create a plugin in Obsidian.md, and I shared this repo link inside the readme.md as source.
If I achieve another kind of cell (calendar, image...) I will share it here too!
https://github.com/RafaelGB/obsidian-db-folder
As I promise, I dev the Calendar column type using react-calendar npm dependency feel free to check it =)
Is it possible to create an installable package? Great package, but hard to use 🥇
Thanks for the feedback @jeff-r-koyaltech @RafaelGB @joseph-vedadi ! Will be using #13 to track creating a package.