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

Fix #803 - Exit out of survey banner #954

Merged
merged 9 commits into from
Aug 5, 2021
Merged

Fix #803 - Exit out of survey banner #954

merged 9 commits into from
Aug 5, 2021

Conversation

codemist
Copy link
Collaborator

@codemist codemist requested a review from maxxcrawford July 23, 2021 19:36
@codemist
Copy link
Collaborator Author

Design query: Is it just me or are those buttons a little too close to the survey question? Should adding small design tweaks be made in a PR addressing a different/specific issue? What is the recommended practice for that?

Copy link
Contributor

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

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

Added some Protocol-specific CSS naming conventions notes.

privaterelay/templates/includes/header.html Outdated Show resolved Hide resolved
static/js/app.js Outdated Show resolved Hide resolved
static/scss/partials/vpn-promo.scss Outdated Show resolved Hide resolved
@codemist codemist requested a review from maxxcrawford July 26, 2021 18:28
static/scss/partials/vpn-promo.scss Outdated Show resolved Hide resolved
.micro-survey-banner.hidden {
display: none;
.micro-survey-banner.is-hidden {
display: none !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the !important here necessary?

static/scss/partials/vpn-promo.scss Outdated Show resolved Hide resolved
@codemist codemist requested a review from maxxcrawford July 30, 2021 21:16
Copy link
Contributor

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

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

One JavaScript edit. I think we're almost there!

static/js/app.js Outdated

//Micro Survey Banner
function dismissSurvey() {
var survey_banner = document.getElementById("micro-survey-banner");
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use const (and let) instead of var.

Suggested change
var survey_banner = document.getElementById("micro-survey-banner");
const survey_banner = document.getElementById("micro-survey-banner");

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! Ques: why do we use const over var?

Copy link
Contributor

@maxxcrawford maxxcrawford Aug 3, 2021

Choose a reason for hiding this comment

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

It's a convention from ES6. The constvalue can't be changed through reassignment, and it can't be redeclared. Since it cannot be reassigned, you have less scenarios, side effects or edge cases to consider.

@codemist codemist requested a review from maxxcrawford August 3, 2021 18:16
Copy link
Contributor

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

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

Correction – Can you catch this up with main first?

Copy link
Contributor

@maxxcrawford maxxcrawford left a comment

Choose a reason for hiding this comment

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

Conflicts!

@codemist codemist requested a review from maxxcrawford August 5, 2021 19:09
@maxxcrawford maxxcrawford merged commit 5da38c5 into main Aug 5, 2021
@maxxcrawford maxxcrawford deleted the add-exit-btn branch August 5, 2021 20:53
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.

2 participants