diff --git a/README.md b/README.md index db8c344..68b1b20 100644 --- a/README.md +++ b/README.md @@ -106,17 +106,43 @@ django-bird includes features for creating flexible components, including: For a full overview of the features and configuration options, please refer to the [documentation](https://bird.readthedocs.io). -## Motivation and Roadmap +## Motivation -### Roadmap +## Roadmap -#### Static Asset Collection +Here's a roadmap of features I'm considering for django-bird: -#### Component Islands +### Static Asset Collection -#### Custom HTML Tag +This is table stakes for a modern Django template component library. You should be able to define CSS and JS for a component and have it loaded automatically when you use that component. -#### Scoped CSS Styles +Unlike django-components, which uses the Django forms library pattern with a `class Media` declaration, I want to allow defining styles and scripts within a single component file. django-bird will then collect and compile these assets, streamlining the whole process. + +### Component Islands + +Ever since I tried Astro and discovered their concept of "Islands" (which they popularized but didn't invent), I've wanted to bring this to Django. + +If you're new to component islands, think of it as fancy lazy-loading. You can set different triggers for when a component's JS assets load (on page load, on idle, on scroll into view). When that event fires, only the necessary assets are loaded. + +There's a neat library from the 11ty team called is-land that could work well here. I'll probably start by integrating it directly, but after looking at their source code, I might end up bringing it in and customizing it for django-bird's specific needs. + +### Custom HTML Tag + +I'm a huge fan of the approaches taken by libraries like [django-cotton](https://github.com/wrabit/django-cotton), [dj-angles](https://github.com/adamghill/dj-angles), and Laravel's [Flux](https://fluxui.dev). They let you use custom HTML-like elements that compile down to native templatetags during loading. + +This gives you the full power of Django's template language, but in a much nicer package. Compare [this django-allauth template](https://github.com/pennersr/django-allauth/blob/f03ff4dd48e5b1680a57dca56617bf94c928f2cf/allauth/templates/account/email.html) with [these django-cotton examples](https://github.com/wrabit/django-cotton#walkthrough). The allauth template, while powerful, is a mess of tags that barely resembles HTML. The cotton templates, on the other hand, look like clean, custom web elements. + +After working with devs from the JavaScript world and using a handful of JavaScript frameworks myself, Django templates can feel ancient compared to JSX. A custom HTML tag approach won't solve all these issues, but it's a step in the right direction. + +### Scoped CSS Styles + +I love how Svelte and other JS frameworks let you use a simple `