Module for consumption in Netlify CMS#12
Module for consumption in Netlify CMS#12hermanbanken wants to merge 18 commits intoarchit-p:masterfrom
Conversation
) * Add some package.json metadata for publishing * Release as a module * Document the koyal-tech publish process * Use rollup to ship libraries * sample app * Working example * accidentally removed this, rollup needs it * Faker is fat. Remove it. * Introduce TableWrapper. Getting more stable-ish. * bug fixes (bump to 0.1.2) - rollup main vs module issue - got columns passing correctly as a prop * mockup component gallery Co-authored-by: Jeff R <jeff-r-koyaltech@users.noreply.github.com>
|
You might not be interested in this PR, please feel free to close it as it ain't done and you might not be willing to maintain it anyway. Anyhow, I wanted to show it and do this small write-up as a way to say 🙏 thank you ❤️ for the nice table functionality and styling (I definitely want to build upon your UX as it feels great in your samples; and I'm no frontender by nature). I might spend some more time polishing it, extract updated states (so I can write the table state to Netlify CMS components), etc. |
|
Very nice! I ended up not using this in the project where I thought that I would. I also discovered that 90% of what I wanted was already exposed and customizable in https://react-table.tanstack.com/ , so my motivation for contributing to and maintaining this library has decreased a little. Nonetheless, it was a helpful context for getting familiar with dependent technologies that make it work. 💪🏼🙏🏼 |
4955049 to
dad8078
Compare
I'm experimenting in enriching the Netlify CMS (if you don't know it, look it up, I think it is awesome 😄). It offers some basic Markdown editing, but no rich table editing support (just editableContent).
I saw your repo and it looked a lot like the awesome tables in Notion, so I thought I could give it a go. After finding the fork of @jeff-r-koyaltech I fiddled a bit more to be able to include it from NextJS & Netlify CMS, and to be able to read the updated state from it.
Notably, it was a hell of a lot of work to be able to include the styles. The only way to get the stylesheet to not interfere with the rest of the CMS was to use a shadowroot via https://github.com/Wildhoney/ReactShadow, but this didn't really play nice with the style system. So I opted for outputting a
<style>element with the actual styles (which then get scoped by ReactShadow). There may be better ways, but I didn't get it working otherwise 😅Proof:
Snippet required:
and how I hooked it up to Netlify CMS: