Adding names to the Widget's builder parameters #666
Closed
MoathCodes
started this conversation in
General
Replies: 2 comments
-
Sure thing! A PR would be awesome. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@MoathCodes Just a note but I'm currently reworking forui_internal_gen & adding names to the parameters for generated functions like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I didn't think opening an issue was the right approach, so I created a discussion instead.
This is a small quality-of-life improvement for widgets that accept a builder (or similar) parameter: give the builder parameters descriptive names so the language server's autocomplete shows helpful names instead of p0, p1, etc.
For example, currently you might see:
But by changing the declaration from this:
to this:
autocomplete will produce a much clearer builder:
It’s a tiny change, but as someone trying ForUI for the first time it makes the API much easier to understand. If these changes to widgets with the same issue would be welcome, I’d be happy to submit a PR.
Beta Was this translation helpful? Give feedback.
All reactions