-
Notifications
You must be signed in to change notification settings - Fork 49
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
Select / typeahead combo for foreign key field #222
base: main
Are you sure you want to change the base?
Conversation
config/config.exs
Outdated
@@ -2,6 +2,7 @@ import Config | |||
|
|||
config :ash, :validate_domain_resource_inclusion?, false | |||
config :ash, :validate_domain_config_inclusion?, false | |||
config :ash, :custom_expressions, [AshAdmin.Expressions.Position] |
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.
We won't be able to use a custom expression like this unfortunately, because once this is deployed the config would be the target users config. We'll have to inline it.
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.
Ah, gotcha. I'll take another stab at inlining it.
to reduce cognitive friction from having "query" represent what the user is typing mixed around use of Ash.Query
Quick update on this: work is still in progress. I've been working with Ash Admin's demo app, which surfaces some concepts I'm still absorbing, and has exposed some weaknesses in my implementation here. More soon. |
Apologies for discontiguous PR.
Relevant discussion points from previous (#210
zachdaniel:
netProphET:
zachdaniel:
So I learned a lot doing this, which is great. I may have gone overboard in how I implemented some of this due to my inexperience with some of the idioms. I'm also unsure about the naming choices for the DSL: admin.label_field and admin.relationship_select_max_items. Also I did not implement a minimum # of characters to wait for in the typeahead yet. It doesn't feel too terrible to me to have it start showing results after 1 keystroke (it does use a 300 ms debounce).
Contributor checklist