You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Love the library and have found it invaluable to create custom one-off admin job tooling with papertrail and the likes baked in.
One little feature idea we had recently was to make it possible to pass in chore input values via URL query string params, as this would allow us to set up nicely deep-linked shortcuts to open a chore from another admin page with some job details pre-filled.
Example use-case:
If we have some admin page with a list of users, and need to run a one-off chore for a particular user, amazing to be able to link to the relevant chore job with the user's id input argument pre-filled in the chore, to avoid us making one-off copy-pasta mistakes when running the job.
Would be great to be able to opt-in as part of the chore inputs options DSL, which ones we want to be pre-fillable via query parameter.
Then from the chore URL in the route, the values for those inputs could be pre-filled based on the decoded corresponding query param from the URL.
Concrete example, say I have a chore called TopupUserPointsBalance and it takes a user_id as one of its inputs.
In the inputs DSL I could specify eg (placeholder name proposal of a new allow_query_param option to specify opt-in to this behavior, although I personally wouldn't mind if it was default supported for all input fields that are expressible in query params!):
to have the_user_id prefilled in the user_id input field.
Thanks & LMK if you / others would see value in this addition!
Understand the project cannot take PRs directly due to licensing/corporate constraints, but would still be happy to contribute a reference PR if this would be helpful.
Think possible to keep the changes very narrowly scoped with a small helper fn addition to ChoreLive and the Input.input_options spec.
All the best & thanks again for sharing this project with the broader community,
Ethan
The text was updated successfully, but these errors were encountered:
Hey Chris & co,
Love the library and have found it invaluable to create custom one-off admin job tooling with papertrail and the likes baked in.
One little feature idea we had recently was to make it possible to pass in chore input values via URL query string params, as this would allow us to set up nicely deep-linked shortcuts to open a chore from another admin page with some job details pre-filled.
Example use-case:
If we have some admin page with a list of users, and need to run a one-off chore for a particular user, amazing to be able to link to the relevant chore job with the user's id input argument pre-filled in the chore, to avoid us making one-off copy-pasta mistakes when running the job.
Would be great to be able to opt-in as part of the chore
inputs
options DSL, which ones we want to be pre-fillable via query parameter.Then from the chore URL in the route, the values for those inputs could be pre-filled based on the decoded corresponding query param from the URL.
Concrete example, say I have a chore called
TopupUserPointsBalance
and it takes auser_id
as one of its inputs.In the inputs DSL I could specify eg (placeholder name proposal of a new
allow_query_param
option to specify opt-in to this behavior, although I personally wouldn't mind if it was default supported for all input fields that are expressible in query params!):Then say my chore runner route is specified as
/chores/
, I could visit this URL then to have theuser_id
input pre-filled on the job:/chores?chore=TopupUserPointsBalance&user_id=the_user_id
to have
the_user_id
prefilled in theuser_id
input field.Thanks & LMK if you / others would see value in this addition!
Understand the project cannot take PRs directly due to licensing/corporate constraints, but would still be happy to contribute a reference PR if this would be helpful.
Think possible to keep the changes very narrowly scoped with a small helper fn addition to
ChoreLive
and theInput.input_options
spec.All the best & thanks again for sharing this project with the broader community,
Ethan
The text was updated successfully, but these errors were encountered: