This repository has been archived by the owner on Dec 23, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When comparing the current URL to the requested parameters, optionally ignore a list of irrelevant keys. This allows us to avoid automatic URL changes if the user includes irrelevant query parameters, like "?foo=bar", in the URL. Related to https://github.com/18F/FEC/issues/72.
Only thing I noticed is the individual transaction links from the aggregates on election pages still have the |
Good catch @noahmanger. If I'm reading correctly, the URLs on the election page should be fixed in #876, so this patch should be good to go. |
* Use built-in currency formatter from `Intl`. * Pass correctly formatted numbers as query params. * Remove unnecessary `cycle` param from aggregate links.
var column = meta.settings.aoColumns[meta.col].data; | ||
return _.extend({ | ||
committee_id: (context.candidates[row.candidate_id] || {}).committee_ids, | ||
cycle: context.election.cycle | ||
committee_id: (context.candidates[row.candidate_id] || {}).committee_ids |
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.
Identifier 'committee_id' is not in camel case.
Identifier 'candidate_id' is not in camel case.
Identifier 'committee_ids' is not in camel case.
Patch updated @noahmanger. |
Getting this behavior to work required some tweaks to the jquery.inputmask configuration. This may get simpler once we move away from input masking for our filters. h/t @noahmanger
Patch updated. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a few improvements related to https://github.com/18F/FEC/issues/72. It turned out that the receipts link on the committee detail page included a "cycle" parameter, which isn't one of the filters for the browse receipts page. This caused an immediate URL change upon loading the browse page.
cc @noahmanger
Note: looking at this code reminds me that it's kind of hairy in places and definitely in need of tests. I'm going to take a crack at refactoring the filter logic later this week--planning to add the missing tests there.