fecgov / openFEC-web-app

DEPRECATED See https://github.com/18F/fec-cms for fec.gov's code
Other
43 stars 31 forks source link

Legal search cleanup #2144

Closed noahmanger closed 7 years ago

noahmanger commented 7 years ago

This started as an endeavor to clean up some of the filter style notes that @jenniferthibault documented in https://github.com/18F/openFEC-web-app/issues/2141 and ended up rolling in a few other cleanup items.

First, it adds the correct classes to the AO search results so they mirror the other data tables.

image

Second, I updated the breadcrumbs across legal search results pages so that they include their immediate parent pages, as well as the main top-level legal resource page. This has been a small thing that's been driving me nuts.

Third, I removed a bunch of the old unnecessary server-side AO search results code, since it all happens client-side now. Mainly that involved refactoring the api caller functions to use **kwargs instead of a bunch of ao_* named arguments.

Interestingly enough, doing so, made it really easy to plop in a few of the MUR filters while we wait to extend the new React code base to MURs.

image

codecov-io commented 7 years ago

Codecov Report

Merging #2144 into develop will increase coverage by 0.03%. The diff coverage is 64.28%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2144      +/-   ##
===========================================
+ Coverage    53.84%   53.88%   +0.03%     
===========================================
  Files           52       52              
  Lines         3421     3389      -32     
  Branches       409      409              
===========================================
- Hits          1842     1826      -16     
+ Misses        1548     1531      -17     
- Partials        31       32       +1
Impacted Files Coverage Δ
static/js/legal/LegalSearch.js 83.09% <ø> (ø) :arrow_up:
static/js/legal/Filters.js 80% <ø> (ø) :arrow_up:
static/js/legal/Tags.js 8.06% <0%> (ø) :arrow_up:
static/js/legal/SearchResults.js 32.14% <0%> (ø) :arrow_up:
openfecwebapp/views.py 39.41% <100%> (ø) :arrow_up:
openfecwebapp/api_caller.py 56.25% <100%> (+0.56%) :arrow_up:
openfecwebapp/routes.py 44.31% <71.42%> (-0.48%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fcb2bb0...4d2fdd1. Read the comment docs.

jenniferthibault commented 7 years ago

This is awesome! Thanks for getting all these annoying little inconsistencies, AND adding some MUR filters 🎉

nickykrause commented 7 years ago

Amazing! Thank you @noahmanger! Adding the MUR number filter will be a win for sure