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

save es keywords to profile and fix onboarding #5105

Merged
merged 3 commits into from
Sep 4, 2019

Conversation

danlipert
Copy link
Contributor

Description

This PR fixes saving of skills/keywords during onboarding, as well as saving the emailsubscriber keyword settings to your user profile so they display in the user directory

Refers/Fixes

#4424

Testing

https://embed.vidyard.com/share/LAXMnXgpZ7RuFkLrkLJeN9?

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #5105 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5105      +/-   ##
==========================================
+ Coverage   31.03%   31.05%   +0.01%     
==========================================
  Files         218      219       +1     
  Lines       17536    18926    +1390     
  Branches     2413     2840     +427     
==========================================
+ Hits         5442     5877     +435     
- Misses      11871    12773     +902     
- Partials      223      276      +53
Impacted Files Coverage Δ
app/marketing/views.py 11.79% <0%> (-0.07%) ⬇️
app/app/urls.py 83.92% <0%> (-5.44%) ⬇️
...arketing/management/commands/export_graph_edges.py 0% <0%> (ø)
app/retail/emails.py 23.7% <0%> (+0.11%) ⬆️
app/dashboard/utils.py 41.87% <0%> (+1.14%) ⬆️
app/dashboard/models.py 57.87% <0%> (+1.27%) ⬆️
app/dashboard/views.py 15.71% <0%> (+1.63%) ⬆️
app/marketing/mails.py 16.91% <0%> (+2.55%) ⬆️

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 a2489fb...883f609. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #5105 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5105      +/-   ##
==========================================
- Coverage   31.03%   31.02%   -0.01%     
==========================================
  Files         218      218              
  Lines       17536    17538       +2     
  Branches     2413     2413              
==========================================
  Hits         5442     5442              
  Misses      11871    11871              
- Partials      223      225       +2
Impacted Files Coverage Δ
app/marketing/views.py 11.79% <0%> (-0.07%) ⬇️
app/dashboard/views.py 14.08% <0%> (ø) ⬆️

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 a2489fb...dd6fbfe. Read the comment docs.

if ($('.navbar #navbarDropdown').html()) {
var url = '/api/v0.1/profile/' + $('.navbar #navbarDropdown').html().trim() + '/keywords';
if (document.contxt.github_handle) {
var url = `/api/v0.1/profile/${document.contxt.github_handle}/keywords`;
Copy link
Contributor

Choose a reason for hiding this comment

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

changed this because menu changed and now $('.navbar #navbarDropdown') wasn't the user gh, was "Products"

@@ -105,7 +105,7 @@ onboard.watchMetamask = function() {
}
};

onboard.getFilters = function(savedKeywords) {
onboard.getFilters = function(savedKeywords, currentKeywords) {
Copy link
Contributor

Choose a reason for hiding this comment

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

added parameters because was saving empty when going out of that page

});
}

$('.suggested-tag input[type=checkbox]').change(function(e) {
onboard.getFilters();
onboard.getFilters(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

this will save the changes


$.get(url, function(response) {
onboard.getFilters(response.keywords);
onboard.getFilters(false, response.keywords);
Copy link
Contributor

Choose a reason for hiding this comment

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

this will just populate the keywords if you already have any

octavioamu
octavioamu previously approved these changes Sep 4, 2019
Copy link
Contributor

@octavioamu octavioamu left a comment

Choose a reason for hiding this comment

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

LGTM Just added some fixes and comments about it.

Fixed eslint
Tested on 3 diff areas
onboard, settings/matching, user directory
Also using http://localhost:8000/api/v0.1/profile/octavioamu/keywords for each change and everything looks consistent, and when you come back to onboard the skills you picked are pre selected.
profile.keywords had the same values as marketing_emailsubscriber in DB

@danlipert
Copy link
Contributor Author

Thanks for the fixes @octavioamu ! appreciate it

@thelostone-mc thelostone-mc merged commit cc66832 into master Sep 4, 2019
@thelostone-mc thelostone-mc deleted the matching-settings-fix branch June 27, 2020 00:44
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.

3 participants