Finish logging

This commit is contained in:
Dennis Schoepf 2021-08-03 18:06:02 +02:00
parent 0e66a015e8
commit 095a50b9a4
6 changed files with 53 additions and 42 deletions

View file

@ -227,54 +227,54 @@
1) Would you say, that you have learned something about the underlying project from 1) Would you say, that you have learned something about the underlying project from
going through this interactive visualization? If yes, what have you learned? If no, what going through this interactive visualization? If yes, what have you learned? If no, what
was missing from the visualization in your opinion? was missing from the visualization in your opinion?
<textarea id="fb-1" name="fb-1" /> <textarea id="fb-1" name="fb-1"></textarea>
</label> </label>
<label for="fb-2"> <label for="fb-2">
2) What was your overall experience going through this visualization? What did you like 2) What was your overall experience going through this visualization? What did you like
or did not like? Is there anything that stood out for you? or did not like? Is there anything that stood out for you?
<textarea id="fb-2" name="fb-2" /> <textarea id="fb-2" name="fb-2"></textarea>
</label> </label>
<label for="fb-3"> <label for="fb-3">
3) How did you experience the companion (Lower right)? Was it helpful or rather 3) How did you experience the companion (Lower right)? Was it helpful or rather
annoying? annoying?
<textarea id="fb-3" name="fb-3" /> <textarea id="fb-3" name="fb-3"></textarea>
</label> </label>
<label for="fb-4"> <label for="fb-4">
4) Could you imageine yourself using this visualization or something similar on 4) Could you imageine yourself using this visualization or something similar on
different projects to learn about them? If so, on which projects would you want to try different projects to learn about them? If so, on which projects would you want to try
it out? it out?
<textarea id="fb-4" name="fb-4" /> <textarea id="fb-4" name="fb-4"></textarea>
</label> </label>
<label for="fb-5"> <label for="fb-5">
5) Have you felt like any information was missing on the things that were shown within 5) Have you felt like any information was missing on the things that were shown within
the visualization? the visualization?
<textarea id="fb-5" name="fb-5" /> <textarea id="fb-5" name="fb-5"></textarea>
</label> </label>
<label for="fb-6"> <label for="fb-6">
6) Would you have liked to see additional information on the underlying project? If so, 6) Would you have liked to see additional information on the underlying project? If so,
what kind of information and how would you have liked? what kind of information and how would you have liked?
<textarea id="fb-6" name="fb-6" /> <textarea id="fb-6" name="fb-6"></textarea>
</label> </label>
<label for="fb-7"> <label for="fb-7">
7) Do you have any additional ideas on how playful elements or game mechanics could be 7) Do you have any additional ideas on how playful elements or game mechanics could be
used within the onboarding phase of software development projects? used within the onboarding phase of software development projects?
<textarea id="fb-7" name="fb-7" /> <textarea id="fb-7" name="fb-7"></textarea>
</label> </label>
<label for="fb-8"> <label for="fb-8">
8) What is your general stance on using games/game mechanics or playful elements within 8) What is your general stance on using games/game mechanics or playful elements within
software development? software development?
<textarea id="fb-8" name="fb-8" /> <textarea id="fb-8" name="fb-8"></textarea>
</label> </label>
<label for="fb-9"> <label for="fb-9">
9) Do you have any additional ideas on how playful elements or game mechanics could be 9) Do you have any additional ideas on how playful elements or game mechanics could be
used within the onboarding phase of software development projects? Any elements from used within the onboarding phase of software development projects? Any elements from
games you play that you think could be reused when making yourself familiar with new games you play that you think could be reused when making yourself familiar with new
projects? projects?
<textarea id="fb-9" name="fb-9" /> <textarea id="fb-9" name="fb-9"></textarea>
</label> </label>
<label for="fb-10"> <label for="fb-10">
10) Anything else you want to mention? 10) Anything else you want to mention?
<textarea id="fb-10" name="fb-10" /> <textarea id="fb-10" name="fb-10"></textarea>
</label> </label>
</div> </div>
<div id="intro-step7"> <div id="intro-step7">

View file

@ -72,9 +72,10 @@ export class Logger {
public logQuestions(answers: string[], isKQ: boolean = false) { public logQuestions(answers: string[], isKQ: boolean = false) {
const uid = store.getState().uid; const uid = store.getState().uid;
this.database.ref(uid).set({ this.database
[`${isKQ ? 'knowledge' : 'general'}Questions`]: answers, .ref(uid)
}); .child(`${isKQ ? 'knowledge' : 'general'}Questions`)
.set(answers);
} }
} }

View file

@ -84,7 +84,16 @@ export class DetailScene {
store.getState().addUserMessage({ store.getState().addUserMessage({
text: "Yaay! You've found all of the important parts of this part of the repository. You will be returned to the subproject overview now. Pick the next subproject you want to take a look at there.", text: "Yaay! You've found all of the important parts of this part of the repository. You will be returned to the subproject overview now. Pick the next subproject you want to take a look at there.",
inputWanted: false, inputWanted: false,
onNext: () => store.setState({ showScore: false, currentScene: Scenes.OVERVIEW }), onNext: () => {
logger.log({
type: 'SF',
timestamp: Date.now(),
message: `Finished subprojects: ${JSON.stringify(
store.getState().finishedSubProjects
)}`,
});
store.setState({ showScore: false, currentScene: Scenes.OVERVIEW });
},
showIdle: false, showIdle: false,
}); });
} }

View file

@ -13,6 +13,7 @@ export class OverviewScene {
player: Player; player: Player;
playerHead: Area; playerHead: Area;
edges: Edge[]; edges: Edge[];
sfLogged: boolean;
constructor() { constructor() {
this.edges = generateEdges(projectMetadata.subprojects); this.edges = generateEdges(projectMetadata.subprojects);
@ -34,7 +35,7 @@ export class OverviewScene {
logger.log({ logger.log({
type: 'OC', type: 'OC',
timestamp: Date.now(), timestamp: Date.now(),
message: 'Click outside edge', message: 'Click inside edge',
}); });
store.getState().setProjectMetadata(edge.name); store.getState().setProjectMetadata(edge.name);
@ -47,7 +48,7 @@ export class OverviewScene {
logger.log({ logger.log({
type: 'OC', type: 'OC',
timestamp: Date.now(), timestamp: Date.now(),
message: 'Click on edge', message: 'Click outside edge',
}); });
} }
}); });
@ -80,12 +81,6 @@ export class OverviewScene {
this.edges.forEach((edgeShape) => { this.edges.forEach((edgeShape) => {
if (store.getState().finishedSubProjects.some((fsp) => fsp === edgeShape.name)) { if (store.getState().finishedSubProjects.some((fsp) => fsp === edgeShape.name)) {
logger.log({
type: 'SF',
timestamp: Date.now(),
message: `Finished subproject: ${edgeShape.name}`,
});
edgeShape.finished = true; edgeShape.finished = true;
} }

View file

@ -43,6 +43,7 @@ export class Revealable {
isHovered: boolean; isHovered: boolean;
isRevealed: boolean; isRevealed: boolean;
wasInteractedWith: boolean; wasInteractedWith: boolean;
wasRevealed: boolean;
minSize: number = 5; minSize: number = 5;
currentSize: number; currentSize: number;
@ -87,6 +88,7 @@ export class Revealable {
} else if (isRevealed && !isHovered) { } else if (isRevealed && !isHovered) {
this.state = RevealableStates.REVEALED; this.state = RevealableStates.REVEALED;
if (!this.wasRevealed) {
logger.log({ logger.log({
type: type:
this.type === RevealableTypes.CONTRIBUTOR this.type === RevealableTypes.CONTRIBUTOR
@ -97,6 +99,9 @@ export class Revealable {
timestamp: Date.now(), timestamp: Date.now(),
message: `Revealed ${this.name}`, message: `Revealed ${this.name}`,
}); });
}
this.wasRevealed = true;
} else { } else {
this.state = RevealableStates.HIDDEN; this.state = RevealableStates.HIDDEN;
} }

View file

@ -54,16 +54,16 @@ export class Intro {
this.backgroundRef = document.querySelector('#intro-background'); this.backgroundRef = document.querySelector('#intro-background');
this.experienceRef = document.querySelector('#intro-experience'); this.experienceRef = document.querySelector('#intro-experience');
this.fb1 = document.querySelector('#fb1'); this.fb1 = document.querySelector('#fb-1');
this.fb2 = document.querySelector('#fb2'); this.fb2 = document.querySelector('#fb-2');
this.fb3 = document.querySelector('#fb3'); this.fb3 = document.querySelector('#fb-3');
this.fb4 = document.querySelector('#fb4'); this.fb4 = document.querySelector('#fb-4');
this.fb5 = document.querySelector('#fb5'); this.fb5 = document.querySelector('#fb-5');
this.fb6 = document.querySelector('#fb6'); this.fb6 = document.querySelector('#fb-6');
this.fb7 = document.querySelector('#fb7'); this.fb7 = document.querySelector('#fb-7');
this.fb8 = document.querySelector('#fb8'); this.fb8 = document.querySelector('#fb-8');
this.fb9 = document.querySelector('#fb9'); this.fb9 = document.querySelector('#fb-9');
this.fb10 = document.querySelector('#fb10'); this.fb10 = document.querySelector('#fb-10');
this.errorRef = document.querySelector('#intro-error'); this.errorRef = document.querySelector('#intro-error');
@ -180,6 +180,7 @@ export class Intro {
]; ];
console.log(answers); console.log(answers);
logger.logQuestions(answers);
} }
private sendKnowledgeQuestionAnswers() {} private sendKnowledgeQuestionAnswers() {}