Skip to content
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

Literature conflict resolution #740

Merged
merged 25 commits into from
Mar 14, 2023
Merged

Conversation

shapiromatron
Copy link
Owner

@shapiromatron shapiromatron commented Nov 29, 2022

Literature tagging and conflict resolution. This merges the new feature, conflict resolution, in the main branch.

With resolution disabled:
image

With resolution enabled:
image

caseyhans and others added 23 commits October 24, 2022 12:59
* database models

* reorder

* updates to database models

* reorganize views

* update form url

* update admin

* fix user reference tags

* fix tests

* fix integration test

* no message

* fix broken build

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Save user reference tag object when tags are changed

* revert unused changes

* add conflict resolution case in update_tags

* add assessment for testing conflict resolution

* fix tests

* remove unused import

* add test

* add prefetch

* lint

* Add resolved field to user tags and has_conflict property to refs

* updates from review

* tune database

* restore all API actions

* change argument order

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* redo screening page layout

* move remove all tags btn

* updates

* integration test

* updates

* use mobx for slideAway

* show full tag toggle

* prop validation

* add screening instructions

* instructions updates

* style changes

* keyword highlighting

* lint

* undo style change addressed in #726

* fix for no references

* updates

* fix padding for prime flavor

* random updates

* fix linting

* use LocalStorage class to handle these

* apply highlighting to title

* pull out of class to make function

* rename to string instead of int-looking string

* fix n+1 query issue

* fix common edge case where there are no keywords

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* stub new lit views

* format

* minor updates

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* change tag hover style

* minor animation and padding tweaks

* change to gray

* frontend lint fix?

* tests fix

>
* Make universal tagging view w/ filter form

* Combine tagging views

* Removed v2 from current implementation

* Removed path for deleted view

* Formatted js files

* Fix tests

* Fix query parameters

* Updated reference search page with changes to reference filterset

* improve queryset performance; reorder form

* fix css when abstracts are short

* use args instead of kwargs for simple reverse statements

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Make universal tagging view w/ filter form

* add user tag distinction to screening view

* lint

* Combine tagging views

* Removed v2 from current implementation

* Removed path for deleted view

* Formatted js files

* Fix tests

* Fix query parameters

* Updated reference search page with changes to reference filterset

* style and test fix

* updates

* improve queryset performance; reorder form

* fix css when abstracts are short

* use args instead of kwargs for simple reverse statements

* remove prefetch

Co-authored-by: Daniel Rabstejnek <rabstejnek@gmail.com>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Add view/template from wf

* make conflict resolution view display tag conflicts correctly

* remove tags diff highlighting for fewer queries

* add api endpoint for and hx-post for resolving conflict

* wip fix resolve_user_tag_conflicts method

* add form tag and hx-target

* create reference conflict template

* refine view and css

* add template rendering to api endpoint

* add reference tags to view (if they exist)

* remove unnecessary method

* change tag style

* add tag diffs

* fix view inheritance

* remove column for frontend filter

* add distinct to queryset

* style updates

* Added filter form to conflict resolution view, added filter for choosing tag types to filter against, updated other filter forms with new filter

* updates

* remove queryset additions

* cleanup css

* update css

* updates from final review

* lint

Co-authored-by: casey1173 <caseyhansen1999@gmail.com>
Co-authored-by: Daniel Rabstejnek <rabstejnek@gmail.com>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Add view/template from wf

* make conflict resolution view display tag conflicts correctly

* remove tags diff highlighting for fewer queries

* add api endpoint for and hx-post for resolving conflict

* wip fix resolve_user_tag_conflicts method

* add form tag and hx-target

* create reference conflict template

* refine view and css

* add template rendering to api endpoint

* add reference tags to view (if they exist)

* remove unnecessary method

* change tag style

* add tag diffs

* fix view inheritance

* remove column for frontend filter

* add distinct to queryset

* style updates

* fix for reference overflow

* revert merge diffs

* remove height

* take 2?

* fix edge case with tags

Co-authored-by: munnsmunns <mmunns16@gmail.com>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Added delete functionality for resolved tags when conflict resolution is enabled

* Refactor js

* Update conflict resolution view

* Add transparency to tag linethrough

* rename classes

* rewrite; remove working tags

* extra space

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* Pagination, better save alerts, other fixes

* Only pass unresolved user tags to tagging view

* Fix automatic conflict resolution by casting tags from payload to int

* Ran linter

* Fix ordering

* updates

* move logic to store instead of ui

* fix backend to use native json

* move message into success well

* animation

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* improve filter logic and fix test db mistake

* rename annotation

* add button for editing tags from conflict res page

* add pagination to conflict res page

* create assessment log when resolving a conflict

* open tag edits in new tab

* lint

* Add actions button to references in conflict view

* updates

* format

Co-authored-by: AA\MMUNNS <munns.matthew@epa.gov>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* add test for conflict resolution api

* add permissions test

* fix test to align with api changes

* raise ValueError when attempting to set tags from the wrong assessment

* test bad requests

* add stub for integration tests

* add integration test (broken)

* add expect response

* check response ok and fix locators

* fix import

* minor updates

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
# Conflicts:
#	frontend/lit/components/TagTree.js
* Rework tags shown on conflict resolution view to be reusable; make tag history page

* Simplified css classes, small style changes

* Update reversion to include tag changes

* Change tag history to tag state

* Fix new integration tests

* More integration test fixes

* rename state to status

* a little more formatting

* move view

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* redo lit review page

* minor updates, topic model header fix

* fix links to filtered lists

* update reference filterset

* lit summary updates, finalize filterset

* field updates

* updates

* fix lint

* update queries and layouts

* updates

* reorganize views; handle unauthenticated users

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
# Conflicts:
#	hawc/apps/lit/api.py
#	hawc/apps/lit/views.py
* updates

* updates

* lint

* fix

* js lint

* partially tagged

* completely untagged

* user tag list

* return to needs tagging

* change 'Tag' button link

* updates from review

* remove unused forms

* fix integration tests

---------

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
* updates

* updates

* lint

* fix

* js lint

* partially tagged

* completely untagged

* user tag list

* return to needs tagging

* change 'Tag' button link

* updates from review

* remove unused forms

* wip

* fix recusion

* filterset fixes

* lint

* style

* lit browse untagged selected tagtree style fix

* js lint

* change default to False for backwards compatibility

* fix height of tagtree

* css tweaks and ordering

---------

Co-authored-by: casey1173 <caseyhansen1999@gmail.com>
@shapiromatron shapiromatron changed the title [DO NOT MERGE] Literature conflict resolution WIP: Literature conflict resolution Mar 2, 2023
@shapiromatron shapiromatron changed the title WIP: Literature conflict resolution Literature conflict resolution Mar 14, 2023
# Conflicts:
#	hawc/apps/lit/views.py
@shapiromatron shapiromatron marked this pull request as ready for review March 14, 2023 14:50
@shapiromatron shapiromatron merged commit 0f2306e into main Mar 14, 2023
@shapiromatron shapiromatron deleted the literature-conflict-resolution branch March 14, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants