Skip to content
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

[AutoFormView] a method to provide properties instead of reflection #682

Open
jcyuan opened this issue Jun 17, 2024 · 6 comments
Open

[AutoFormView] a method to provide properties instead of reflection #682

jcyuan opened this issue Jun 17, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jcyuan
Copy link

jcyuan commented Jun 17, 2024

otherwise AOT can't get compiled.

btw i don't know why, my App got stuck when booting up if i use AutoFormView...... not sure why, still investigating.

btw, in the doc https://enisn-projects.io/docs/en/uranium/latest/infrastructure/AutoFormView,

Then you can use it like this:
<uranium:FormView Source="{Binding .}" />

i believe it's a typo? should be uranium:AutoFormView i think?

@jcyuan
Copy link
Author

jcyuan commented Jun 17, 2024

btw, a question about usage, ReactiveAttribute is required? or i can actually use ObservableProperty too? my app does not use ReactiveUI.....

@jcyuan
Copy link
Author

jcyuan commented Jun 17, 2024

otherwise AOT can't get compiled.

btw i don't know why, my App got stuck when booting up if i use AutoFormView...... not sure why, still investigating.

btw, in the doc https://enisn-projects.io/docs/en/uranium/latest/infrastructure/AutoFormView,

Then you can use it like this:
<uranium:FormView Source="{Binding .}" />

i believe it's a typo? should be uranium:AutoFormView i think?

my App got stuck, i found the reason, if StyleClass missing, it will happen.....

for example i use this:
<Button input:FormView.IsSubmitButton="True" Text="Add" StyleClass="ElevatedButton" />
ElevatedButton missing caused the hanging.... the default styles provided by UraniumUI does not have this style key, i tried to search but no result.

@jcyuan
Copy link
Author

jcyuan commented Jun 17, 2024

otherwise AOT can't get compiled.
btw i don't know why, my App got stuck when booting up if i use AutoFormView...... not sure why, still investigating.
btw, in the doc https://enisn-projects.io/docs/en/uranium/latest/infrastructure/AutoFormView,

Then you can use it like this:
<uranium:FormView Source="{Binding .}" />

i believe it's a typo? should be uranium:AutoFormView i think?

my App got stuck, i found the reason, if StyleClass missing, it will happen.....

for example i use this: <Button input:FormView.IsSubmitButton="True" Text="Add" StyleClass="ElevatedButton" /> ElevatedButton missing caused the hanging.... the default styles provided by UraniumUI does not have this style key, i tried to search but no result.

I'm sorry, just solved.
this was caused by the same reason i have found and reported to MAUI team: dotnet/maui#23079
:(

@enisn
Copy link
Owner

enisn commented Jun 20, 2024

Hi, sorry for the late reply, I was away for a while.

AutoFormView is an experimental component and at the beginning, its purpose was to build PoC CRUD operations faster.

But I know it should support AOT compilation and using reflection causes problems on AOT compilation. So, I agree to replace Reflection usage with Source Generator or a method provider/factory for properties

@enisn enisn self-assigned this Jun 20, 2024
@enisn enisn added this to the v2.10 milestone Jun 20, 2024
@enisn enisn added the enhancement New feature or request label Jun 20, 2024
@enisn
Copy link
Owner

enisn commented Jun 20, 2024

btw, a question about usage, ReactiveAttribute is required? or i can actually use ObservableProperty too? my app does not use ReactiveUI.....

[Reactive] is just for demonstration, It'll work plain properties or fields with ObservableProperty attribute. I should add an information about it in the documentation 👍

@jcyuan
Copy link
Author

jcyuan commented Jun 20, 2024

Hi, sorry for the late reply, I was away for a while.

AutoFormView is an experimental component and at the beginning, its purpose was to build PoC CRUD operations faster.

But I know it should support AOT compilation and using reflection causes problems on AOT compilation. So, I agree to replace Reflection usage with Source Generator or a method provider/factory for properties

I got it. thanks man!
this is absolutely a super component IMO!! I love it!
It makes things so simple ❤️‍🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants