-
Notifications
You must be signed in to change notification settings - Fork 16
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
Render tag UDFs in the Reference Tagging view #913
Conversation
currently renders all udfs even if no tags are selected
# Conflicts: # hawc/apps/animal/templates/animal/endpoint_detail.html # hawc/apps/study/forms.py # hawc/apps/udf/cache.py # hawc/apps/udf/forms.py # hawc/apps/udf/migrations/0003_modeludfcontent.py # hawc/apps/udf/models.py # hawc/apps/udf/signals.py # hawc/apps/udf/templates/udf/udf_form.html # hawc/apps/udf/views.py # tests/hawc/apps/common/dynamic_forms/test_forms.py
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.
Nice work @caseyhans and @munnsmunns! This was a really complicated implementation, great job figuring out how to pass static HTML forms and dynamically inject values in/out. There are a few oddities with how it had to be done (sending data to/from as arrays of values, checking for multiple choice fields on the backend), but I couldn't figure out a better way to do it, so I put some TODOs for future thinking on other ways to improve. That said, I put it through a number of tests, and it worked great.
I did one major refactoring on the JS side to try to separate out the UDF code as much as I could. I tried to break out the individual changes as much as I could for review of my changes.
- 2e16ca6 cleanup from code review (16 minutes ago) {Andy Shapiro}
- 68bfe49 fix integration test (32 hours ago) {Andy Shapiro}
- 50127cf separate udf js components (2 days ago) {Andy Shapiro}
- 7932aa2 move udf component to separate file (2 days ago) {Andy Shapiro}
- efe4065 restore fix for multiple choice (2 days ago) {Andy Shapiro}
- 5a0da97 rewrite udf form save code (2 days ago) {Andy Shapiro}
- 5c30756 move clear form code to helper method (2 days ago) {Andy Shapiro}
- 84b08cd build css class instead of inline (2 days ago) {Andy Shapiro}
- 7fbba2c remove cachable if it cant be unset (3 weeks ago) {Andy Shapiro}
- a888810 more language refinement (3 weeks ago) {Andy Shapiro}
- 57bc5a4 minor edits (3 weeks ago) {Andy Shapiro}
- abe4509 add tag form cache (3 weeks ago) {Andy Shapiro}
Lays the groundwork for using User Defined Forms that are bound to Reference Tags.
TagUDFContent
modelTODO:
Example of displayed Tag UDF:
