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

Add feature flag, silence JS tests, address some feedback for presidential map #3556

Conversation

lbeaufort
Copy link
Member

@lbeaufort lbeaufort commented Feb 18, 2020

Feature flag info
To turn on the feature, export FEC_FEATURE_PRESIDENTIAL_MAP=True
To turn it off, unset FEC_FEATURE_PRESIDENTIAL_MAP

You may want to add it to your bash profile so that you don't have to keep setting it.

@lbeaufort lbeaufort changed the base branch from develop to feature/3514-presidential-map-1 February 18, 2020 18:25
@lbeaufort lbeaufort changed the title [WIP] Add feature flag for presidential map Add feature flag for presidential map Feb 18, 2020
@lbeaufort lbeaufort changed the title Add feature flag for presidential map Add feature flag, silence JS tests for presidential map Feb 19, 2020
Copy link
Contributor

@johnnyporkchops johnnyporkchops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to merge

@lbeaufort lbeaufort changed the title Add feature flag, silence JS tests for presidential map Add feature flag, silence JS tests, address some feedback for presidential map Feb 19, 2020
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (feature/3514-presidential-map-1@9dd0e2d). Click here to learn what that means.
The diff coverage is 66.66%.

Impacted file tree graph

@@                        Coverage Diff                         @@
##             feature/3514-presidential-map-1    #3556   +/-   ##
==================================================================
  Coverage                                   ?   74.94%           
==================================================================
  Files                                      ?      120           
  Lines                                      ?     7383           
  Branches                                   ?      642           
==================================================================
  Hits                                       ?     5533           
  Misses                                     ?     1850           
  Partials                                   ?        0
Impacted Files Coverage Δ
fec/data/views.py 54.27% <ø> (ø)
fec/fec/settings/base.py 87.95% <ø> (ø)
fec/data/urls.py 85.71% <66.66%> (ø)

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 9dd0e2d...8f473ab. Read the comment docs.

@@ -2,6 +2,7 @@

from data import views
from data import views_datatables
from fec import settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This will let us turn on/off other URLs through feature flags, too

const openDownloads = function(){
console.log('callback')

const openDownloads = function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will probably make this more specific to the PresFinMap rather than global to avoid other possible conflicts, but we can get to that for or after launch

@@ -1,3 +1,5 @@
/* eslint-disable no-undef */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this is only to get things on dev and should not go into production

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rfultz agreed that it seems prone to human error if we forgot to remove it - if you'd rather address the errors individually, feel free to commit here or on another iteration!

Comment on lines +1 to +2
/* eslint-disable no-undef */
/* eslint-disable no-unused-vars */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that these are only to get things on dev and should not go into production

Comment on lines +1194 to +1197
hT = instance.downloadsWrapper.getBoundingClientRect().top + wS,
hH = instance.downloadsWrapper.offsetHeight,
wH = window.innerHeight;
if (wS > hT + hH - wH) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to name these vars more human-friendly but no biggie for now

@@ -1309,3 +1312,6 @@ function logUsage(candID, electionYear) {
}

new PresidentialFundsMap();

/* eslint-enable no-undef */
/* eslint-enable no-unused-vars */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter may require a blank line at the end. 🤞

@lbeaufort lbeaufort merged commit dc436a4 into feature/3514-presidential-map-1 Feb 19, 2020
@lbeaufort lbeaufort deleted the feature/3514-presidential-map-1-feature-flag branch March 10, 2020 18:01
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.

4 participants