-
Notifications
You must be signed in to change notification settings - Fork 675
[feat]:[A2UI Vue 2 Renderer - Render A2UI components using Vue 2.6 wi… #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
paullewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, thank you for this huge contribution. I've left a couple of notes, but they apply across the PR and boil down to:
- Can we remove
(this as any)and match the base types more closely? - Can we align the styles to the Angular/Lit implementations? There seem to be some styles applied per component that aren't exactly the same, e.g., the divider.
Again, thank you for the PR!
|
|
||
| if (!target || !path) return; | ||
|
|
||
| (this as any).setData(path, target.checked); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to type this more cleanly than dropping to an any?
| flex: var(--weight); | ||
| margin: 0; | ||
| border: none; | ||
| background-color: currentColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these styles differ from the Angular/Lit counterparts. Can we align them?
|
Hi Paul, Thank you for the thorough review! I've addressed both of your
concerns: 1. Removed (this as any) casts I've introduced a typed Vue
constructor DynamicComponentVue that properly types all mixin methods and
injected properties. All components now use DynamicComponentVue.extend()
instead of Vue.extend(), which provides proper typing for:
resolvePrimitive(), sendAction(), getUniqueId(), setData()
Injected processor and theme properties
2. Aligned divider styles with Angular/Lit implementations Updated the
divider component to match the reference implementations:
Changed from background-color: currentColor; opacity: 0.2; to background:
#ccc;
Added wrapper div with host-equivalent styles (display: block; min-height:
0; overflow: auto;)
Simplified hr styles to height: 1px; background: #ccc; border: none;
Both npm run type-check and npm run build pass successfully. Let me know if
you'd like any further adjustments!
Paul Lewis ***@***.***> 于2026年1月6日周二 18:10写道:
… ***@***.**** requested changes on this pull request.
Firstly, thank you for this huge contribution. I've left a couple of
notes, but they apply across the PR and boil down to:
1. Can we remove (this as any) and match the base types more closely?
2. Can we align the styles to the Angular/Lit implementations? There
seem to be some styles applied per component that aren't exactly the same,
e.g., the divider.
Again, thank you for the PR!
------------------------------
In renderers/vue2/src/lib/catalog/checkbox.vue
<#442 (comment)>:
> + return (this as any).resolvePrimitive(this.label);
+ },
+ },
+
+ created() {
+ this.inputId = (this as any).getUniqueId('a2ui-checkbox');
+ },
+
+ methods: {
+ handleChange(event: Event) {
+ const path = this.value?.path;
+ const target = event.target as HTMLInputElement;
+
+ if (!target || !path) return;
+
+ (this as any).setData(path, target.checked);
Is there any way to type this more cleanly than dropping to an any?
------------------------------
In renderers/vue2/src/lib/catalog/divider.vue
<#442 (comment)>:
> + },
+
+ computed: {
+ axisClass(): string {
+ return `a2ui-divider--${this.axis || 'horizontal'}`;
+ },
+ },
+});
+</script>
+
+<style>
+.a2ui-divider {
+ flex: var(--weight);
+ margin: 0;
+ border: none;
+ background-color: currentColor;
Some of these styles differ from the Angular/Lit counterparts. Can we
align them?
—
Reply to this email directly, view it on GitHub
<#442 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPHCGZGYZLHMLN5AZGLSXD4FOCX3AVCNFSM6AAAAACQZRTSISVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMMZQGI4DSNZTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
A2UI Vue 2 Renderer - Render A2UI components using Vue 2.6 with Options API