netlify / explorers

https://explorers.netlify.com/
MIT License
261 stars 40 forks source link

send mission-complete to activity table #477

Closed tzmanics closed 3 years ago

tzmanics commented 3 years ago
philhawksworth commented 3 years ago

Yay!

Looks like this is responsible for sending a mission-complete message to the api.

QQ @tzmanics: Should the logic which determines if a mission has been completed live here in the stage page or centrally in the activity hub?

I was imagining that the stage view would tell activity hub stage-complete rather than mission-complete so that the activity hub could determine if all stages for a mission had ben completed regardless of the order they had been watched, and then record mission-complete as appropriate. This also means that a stage can exist in multiple missions and not be need to be aware of that.

Am I understanding the approach / implementation correctly?

tzmanics commented 3 years ago

@philhawksworth The logic for a mission being complete already existed in [stage].js bc of the modalCongrats confetti thingy so we just utilized that. if it turns out we need to take the approach you listed above in the future we can do that. but for now, we'll keep the scope clean.