Skip to content

Commit

Permalink
Write changeset tags for new mappers to indicate walkthrough progress
Browse files Browse the repository at this point in the history
These tags all start with `ideditor:`
(closes #3968)

```
ideditor:walkthrough_completed=yes
ideditor:walkthrough_progress=welcome;navigation;point;area;line;building;startEditing
ideditor:walkthrough_started=yes
```
  • Loading branch information
bhousel committed Aug 17, 2017
1 parent ea298b0 commit 2bf7a5e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/ui/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var changeset;
var readOnlyTags = [
/^changesets_count$/,
/^created_by$/,
/^ideditor:/,
/^imagery_used$/,
/^host$/,
/^locale$/
Expand Down Expand Up @@ -335,6 +336,25 @@ export function uiCommit(context) {
// always update userdetails, just in case user reauthenticates as someone else
if (userDetails && userDetails.changesets_count !== undefined) {
tags.changesets_count = String(userDetails.changesets_count);

// first 100 edits - new user
if (parseInt(tags.changesets_count, 10) < 100) {
var s;
s = context.storage('walkthrough_completed');
if (s) {
tags['ideditor:walkthrough_completed'] = s;
}

s = context.storage('walkthrough_progress');
if (s) {
tags['ideditor:walkthrough_progress'] = s;
}

s = context.storage('walkthrough_started');
if (s) {
tags['ideditor:walkthrough_started'] = s;
}
}
} else {
delete tags.changesets_count;
}
Expand Down

0 comments on commit 2bf7a5e

Please sign in to comment.