-
Notifications
You must be signed in to change notification settings - Fork 127
Configurable Forms for flows #679
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
|
@inducer, let me know what you think. I'll add tests if you think there shouldn't be any major re-write. |
Codecov Report
@@ Coverage Diff @@
## master #679 +/- ##
==========================================
- Coverage 96.56% 96.08% -0.49%
==========================================
Files 45 46 +1
Lines 11215 11459 +244
Branches 2084 2137 +53
==========================================
+ Hits 10830 11010 +180
- Misses 298 361 +63
- Partials 87 88 +1
Continue to review full report at Codecov.
|
|
|
||
| class FormsBase(SingleCourseTestMixin, MockAddMessageMixing, TestCase): | ||
|
|
||
| initial_commit_sha = "f3e9d31a61714e759a6ea12b900b173accb753f5" |
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.
@inducer, I used this commit from inducer/relate-sample#12 which has flows/instant_flow.jinja file and it is included by the created flow using {% include 'flows/instant_flow.jinja' %}, but when I try this in tests the templating engine can't find this file. How can I make jinja2 see this file?
cc @lukeolson
A form description looks like https://github.com/isuruf/relate-sample/blob/91226393241cfed6457db533addfb2da6e83f645/forms/instant.yml
There are 5 types of fields.
Text, Integer, Float, Choice, Hidden.template_inandtemplate_outare mandatory fields and they can be eitherHiddenorText. IfHiddenthe values are fixed, but ifText, the user who fills the form can fill them.If
template_out=flows/asd.ymlthen the actual output would beflows/asd_20190930_022148_311577.ymlwhere the time is appended.There's a type for a form which is only
flowfor now. If there's aannouncefield and set to true and the type is aflow, then anInstantFlowRequestis created.Flow created looks like
The templated flow
template_incan use the form variables by their id and also have access tocreated_timeandid.created_timeis useful for instant flows that @lukeolson mentioned.Let me know what you think.