Feedback on abstractions and general first impressions
Thanks for this OSS. I'm always appreciative of the efforts in building such libraries and the idea of contextual UI capabilities would seem to have merit no doubt.
Here are a couple of thoughts/questions to hopefully supply some useful feedback since the prerelease suggests it's what you're looking for from the community.
- I'm wondering if the renderers (currently Lit and Angular) should be separate workspaces / repos? It feels like A2UI is doing more then one thing sort of SRP violation.
- Is having
A2UIsupply default UI disincentivizing to 3rd party UI libraries? For example, it's a bit hard to tell if using these custom Catalogs is the recommended way, or, is using default the nominal path and using custom UI simply a "possibility"? As a UI component library author, I'll be more motivated if it's the former (obviously). I'm not saying it isn't, but, currently the way the code reads makes it feel like the core UI components are prioritized. Would love to hear if this is incorrect. registerCustomComponentsseems to be where you register your components for Lit. But, "custom" in this regard feels overloaded: 1) It's registering acustomElementsin terms of web components, but, 2) is it "how" you add custom components to the A2UI Lit renderer? Or is this perception completely wrong?- But, is
registerCustomComponentsactually doing anything? It seems likecomponentRegistry.registryis where we actually register these components from the example:
import { componentRegistry } from "@a2ui/lit/ui";
import { OrgChart } from "./org-chart.js";
import { PremiumTextField } from "./premium-text-field.js";
export function registerContactComponents() {
componentRegistry.register("OrgChart", OrgChart, "org-chart");
componentRegistry.register(
"TextField",
PremiumTextField,
"premium-text-field"
);
// and so on
I haven't yet git clone'd the project so I'm just code diving within GitHub so my view is a first take limited view, but, my feedback is that it's not immediately obvious how some of these conventions work; and so I wonder if an improved dux might be achieved for 0.9 with feedback like this in mind.
I'm considering whether to adapt https://www.agnosticui.com/ — which I've recently rewritten in Lit web components core with React and Vue wrappers (but obviously supporting any framework that can use Lit/web components) to support A2UI's JSON to component Catalog mapping and/or maybe build a custom renderer. But, I would want to know first ROI based on some of my hopefully reasonable questions above. In any event, thanks for contributing this library to the community!