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

More prominent use of streaks #48749

Open
oriooctopus opened this issue Dec 13, 2022 · 35 comments
Open

More prominent use of streaks #48749

oriooctopus opened this issue Dec 13, 2022 · 35 comments
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have

Comments

@oriooctopus
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I recently found out that free code camp tracks your daily streak. I remember when I used Duolingo the streak always helped to keep me motivated. Similarly, I know a few video games that use streaks as a way to encourage daily use. I wonder if we could make this more prominent to gamify the learning experience a little bit and make consistent learning a bit more emotionally rewarding.

Describe the solution you'd like

Perhaps we can display it with a little notification/annoucement bar that pops out from the top. For example, something like: "Your streak is now 14, that's an all time high!"

Describe alternatives you've considered

Instead of showing up in a notification bar, it could show up in the model that pops up when you complete a challenge. I like this less though.

Additional context

This was initially mentioned in #48234
@Sboonny made the following point:

I disagree with the streak in general, as it may incentives campers into taking a certification they don't want or need, to keep the streak going, which is against one of the principles of freeCodeCamp. So maybe we should delete it, or keep it hidden.

I don't think that somebody would put in all the energy to get a new certificate just for the streak, it's not like the streak leads to any material gain it's just a small dopamine boost. In any case, from my limited perspective there are cons to any change like this, but the pros seem to outweigh the cons. The more fun and rewarding the learning experience is more likely uses are to stick with it, I think that counts for a lot.

@oriooctopus oriooctopus added the type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have label Dec 13, 2022
@Sboonny Sboonny added status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. labels Dec 13, 2022
@jeremylt
Copy link
Member

I'm not big into streaks personally. Days off are good for you.

@Sboonny
Copy link
Member

Sboonny commented Dec 13, 2022

Let's push it to campers to decide 🤔? We can add a Boolean in the setting page, that campers can change to determine if they want streak to be displayed or not.

If this okay, we can discuss how to display it

@moT01
Copy link
Member

moT01 commented Dec 13, 2022

I don't think we need an option for campers on this one. I'm not completely against it, but I just don't think it's necessary.

I do like this idea. I would like to see something like, if (streak > 1 && first challenge completed for the day) -> display streak congratulatory message. I would put it in the completion modal for challenges that have those, and in the "lower jaw" on the new RWD/multifile editor. Probably in place of the existing congratulatory message. It would be subtle, but visible.

I guess I can see one of our "toast" messages being good, too. So I dunno, either way would probably be fine to me.

@QuincyLarson
Copy link
Contributor

Yes – I am in 100% agreement with Tom here. Kind of like when you play a fighting game. It doesn't say "0 hit combo" all the time, it just starts saying "monster combo" "awesome combo" those sorts of things after you successfully string several hits together.

@oriooctopus
Copy link
Contributor Author

I would put it in the completion modal for challenges that have those, and in the "lower jaw" on the new RWD/multifile editor. Probably in place of the existing congratulatory message. It would be subtle, but visible.

That makes sense. I think it would be cool to put a small cute animation above the text there make things a bit more fun. Kind of like in the spirit of asana's "celebrations". I work with animations frequently at my current job so I could implement it easily. It might sound like a strange idea, so what I propose is that my wife and I (she's training to be a designer) could come up with two designs, one with animations and one without, and then discuss which would be best to proceed.

I guess I can see one of our "toast" messages being good, too. So I dunno, either way would probably be fine to me.

We can also come up with a quick design for this just to compare it to the other options

@moT01
Copy link
Member

moT01 commented Dec 14, 2022

We have "toast" messages that display frequently - if you go to your settings and click save on anything, a popup will say "Your settings have been saved" or something. That's what I meant with those. We would certainly love to see any mocks you two want to create @oriooctopus & @laportabellita 👍 I can't promise they will be used, but ideas are always welcome - I've liked every UI mock you've shown us @oriooctopus, so I'm excited to see what you come up with.

@oriooctopus
Copy link
Contributor Author

oriooctopus commented Dec 15, 2022

Regarding options, perhaps users have the option of giving them between 1 and 4 days off per week. So for example if they select 2 days, that means as long as they complete a lesson five days of the week they get to keep the streak. The minimum could even be one so that we don't encourage an obsessive "Never miss a day" philosophy

@moT01
Copy link
Member

moT01 commented Dec 16, 2022

I think it needs to be days in a row. Miss one day, and the streak is broken. We already calculate this streak - it is displayed on profile pages:
Screen Shot 2022-12-15 at 6 16 10 PM
I would use that same calculation. Note that with the complexities of timezones, DST, the viewers location, etc. the streak can sometimes be a little off. I fixed it up a while ago and complaints about it have mostly gone away - but we still see one here and there.

@jeremylt
Copy link
Member

And this is why I don't like streaks. I do 'weekday streaks' because I don't want to burn out. I think if we want to make streaks more important, offering 'mental health friendly streaks' would be really nice.

@oriooctopus
Copy link
Contributor Author

oriooctopus commented Dec 16, 2022

offering 'mental health friendly streaks' would be really nice

Can you elaborate on what that would look like? Or is it similar to what I was talking about above regarding customization

I think it needs to be days in a row. Miss one day, and the streak is broken. We already calculate this streak - it is displayed on profile pages:

I think that both lenient and strict streaks both have merit to them. There's plenty of pros and cons to each option and I think that on the whole those pros and cons mainly balance themselves out. For that reason, if anything maybe we could implement the simple option of just keeping the simple 'strict' streak logic and then collect feedback from users. If they're saying that it's stressful or they would like the option to have a break then we can add options for more lenient streaks. On the whole though, the biggest improvement to me is just making the streak more prominent and celebratory.

@moT01
Copy link
Member

moT01 commented Dec 16, 2022

the biggest improvement to me is just making the streak more prominent and celebratory.

K, now I'm seeing it - make it more gamified. I still feel like I would prefer to keep the streak as "days in a row" - it just feels inaccurate to me otherwise. Here's some other ideas that could maybe have a similar effect. Messages like "You earned 20 points this week!", and "Congratulations on earning your 1000th point!", and "10 points in 10 minutes, way to go!"

Dynamic congrats messages based on campers accomplishments. We could potentially make others based on where they are in the curriculum. Something like - if they finish the last step before a cert project, "Congratulations on finishing the project. Up next is the Build a Tribute Page project."

@jeremylt
Copy link
Member

I think the 'mental health'/'burnout' friendly version is hard to describe because I haven't seen it.

Personally, I have worked hard to guard days off in my schedule. It was a hard skill to learn. Streak counting sorta fights this, so people who want days off can't participate.

Some sort of points per week streak tracking could be a later feature maybe but would be a nice way to let people who guard their days off participate.

@oriooctopus
Copy link
Contributor Author

Messages like "You earned 20 points this week!", and "Congratulations on earning your 1000th point!", and "10 points in 10 minutes, way to go!"

I'm a big fan of points and to me it seems very complementary that streak would be tied in with points. Duolingo does a nice job combining these two. I didn't bring up points because they don't seem to be used much at FreeCodeCamp so it seemed like a lot of change all at once. However, I'm all for adding them in the future, they would be a great change to make as well to increase that dopamine/gamification effect. That's why I see them on a lot of different learning websites. In an ideal world I think it would be like Duolingo where they buy you stuff like cool skins, or a break from your streak, or just other fun stuff.

Dynamic congrats messages based on campers accomplishments. We could potentially make others based on where they are in the curriculum. Something like - if they finish the last step before a cert project, "Congratulations on finishing the project. Up next is the Build a Tribute Page project."

Very much agree. Just thinking out loud here so take this with a grain of salt but perhaps we could also have some sort congratulatory message for when students pass a particularly hard challenge. That way if they passed it without too much issues they'll feel good about themselves, and if they did have issues it'll help read them other imposter syndrome or bad feelings. To me I feel like getting stuck or feeling bad or self-conscious is one of the biggest ways I've seen people quit learning to code.

Some sort of points per week streak tracking could be a later feature maybe but would be a nice way to let people who guard their days off participate.

This is another good option to consider

@oriooctopus
Copy link
Contributor Author

@moT01 something I'm realizing is that on the new course style the completion model only shows up some of the time. If the streak increasing event happens on the first challenge they complete of the day, then there's a big chance that the model won't show up unless we change things.

@moT01
Copy link
Member

moT01 commented Dec 16, 2022

A congrats message is still shown though:
Screen Shot 2022-12-16 at 2 01 27 PM

I was thinking we would put it there - and challenges with a completion modal would use that.

@oriooctopus
Copy link
Contributor Author

Ah ok, understood. Can you help understand in what situations a completion modal shows up in?

@moT01
Copy link
Member

moT01 commented Dec 18, 2022

Only the new Responsive Web Design steps use that image I shared (not the modal). I believe the completion modal shows up every time you complete any other challenge - including after you complete one of the cert projects in the new RWD.

@oriooctopus
Copy link
Contributor Author

And to confirm, I imagine that as more courses are converted to the new style they will have the same behavior with the lack modals/completion as the responsive web design course?

@moT01
Copy link
Member

moT01 commented Dec 19, 2022

Yes, that is the plan @oriooctopus. The new JS stuff in development will all use it. I could mention that that UI is still fairly new and may evolve, but I think the existence of a congrats message will always be there with any of our challenges, no matter the type - so this feature should always have a place.

@laportabellita
Copy link

laportabellita commented Dec 19, 2022

After seeing how the lessons work without the module showing up every time a student completes a step within a lesson, I think it would be better for the message to show up on a toast component, maybe once a day after the user completes their first lesson of the day. @orioctopus tells me he thinks that free code camp may already has something like this. Would you mind telling me if this is the case and if so where to find it or showing me what it looks like?

Thank you!

@ojeytonwilliams
Copy link
Contributor

Hi @laportabellita we don't have toasts, exactly, but we do show messages like this:
image

The code in question is a little distributed across the codebase, but

function Flash({ flashMessage, removeFlashMessage }: FlashProps): JSX.Element {

is probably a good place to start. Also,

is where you can find the messages themselves. Finally, the text corresponding to those keys can be found here

"account-deleted": "Your account has been successfully deleted",

Let me know if you need any more info.

@laportabellita
Copy link

For this design I tried to show the streak in a way that wasn’t too prominent but still noticiable. The notification shows up for a short period of time, and after that it disappears.
I also included a gear icon, which shows the word “settings” on hover, it could also say “turn streak off”, or any other copy you think would work. My idea is that this takes to the settings area of the website, where you can turn off the night mode, and there the option to turn on the streak would show up, I believe this is a good way to give users to option to turn it off if they dislike it.
This is the prototype, you can hover over the gear icon.

Here's the prototype

I also made a version with the green design you guys already have
Screen Shot 2022-12-21 at 11 42 02 AM

@moT01
Copy link
Member

moT01 commented Dec 21, 2022

Looks good @laportabellita 👍 I think I like the yellow better.

At first I was thinking that the message should replace the existing congratulatory messages, but I think this looks pretty good. I don't think we needed an option to turn the messages off at the moment. At most, it shows up once per day. If it expands to include a bunch of different messages that show up more frequently, then maybe we add that.

@oriooctopus
Copy link
Contributor Author

So I think there are a few questions remaining, @moT01 I'm wondering if you or someone else can advise:

  • What should the exact wording of the message be?
  • when should we show the message - I think we should avoid showing it for a one day streak and then show it for every day after that.
  • it would be nice if for larger milestones like a week or a month we either have a slightly different text or perhaps even a flame animation. @laportabellita experimented a bit with the idea of a small flame animation in the bar but we thought it was a bit too much for the streak message. On second thought though, it might be appropriate for larger milestones. What are your thoughts?
  • regarding the old course style and not sure what we want to do. We actually had a superior design for the models (until we realized models weren't really used in the new pattern and abandoned it for the toast notification) that would pop up but I don't know if we wanna add inconsistencies for a pattern that's getting deprecated anyways.
    You can see the streak in the top left
    Screen Shot 2022-12-21 at 3 03 04 PM
    When the streak would go up there would be a little flame animation
    Screen Shot 2022-12-21 at 3 04 34 PM
    If a user hovered over the streak a little pop-up would appear
    Screen Shot 2022-12-21 at 3 05 12 PM

We could still do something like this but I think it depends on how quickly we are planning on moving away from all these old courses. We could also try to have the toast pattern work for these old courses but my fear is that the user wouldn't notice it because the model would be on top.

@moT01
Copy link
Member

moT01 commented Dec 23, 2022

I think the toasts in @laportabellita's mock would work. Like I said - I prefer that yellow.

exact words...

Not sure. But I would try to make it as clear as you can about what they have done. Maybe, "Congratulations, you have coded 7 days in a row!"

when should we show the message...

I mentioned above that I would show it if (streak > 1 && first challenge completed for the day) - so don't show it if they just have a 1 day streak.
also
I would show the toast after they click the "Submit and go to next challenge" button since they don't actually get the point for the day until they submit the challenge. So I'm thinking to show it at the start of the next challenge after they click that button.

it would be nice if for larger milestones...

Yes, I think it would be nice to give a bigger message or different text with different milestones. Also, I like the idea I mentioned of having all sorts of these types of messages. e.g. "Congratulations on earning your 1000th point!" and maybe "Only 10 more steps to finish the project". I would try and keep simple to start and just do the streak message for now. We can expand the messages and make them more dynamic later.

One main concern I had with the toasts was that, with our flash messages, users have to click the X to close them. We don't want that extra click if possible (not sure, though) - campers still need to be able to move between challenges without getting distracted too much I think. The toasts go away on their own, as mentioned, so I think they may work - but since I've been the only one to sort or weigh in on the toasts, I would like to hear what maybe @ahmadabdolsaheb @bbsmooth think about them.

@ahmaxed
Copy link
Member

ahmaxed commented Dec 23, 2022

Quotes are coming in the lower jaw of the multifile editor and they will most likely replace some or all of the current congratulatory message. #46429

Initially we could conditionally replace the quote with progress/streak related messages when applicable and see if there is a positive change in user behaviour. If so, we could iterate further.

Putting donation modals on some meaningful progress/streak milestones have been in my a/b testing backlog for a while. I will be testing them as soon as I get the growthbook ab testing working.

Note: There is a bug in the api that causes inconsistencies in the completed challenges. That has led us to roll back on a few features in the past including showing the number of completed challenges in the navigation. That is why we are limited on ways we could make the streaks more prominent for now.

@bbsmooth
Copy link
Contributor

Regarding toasts, which I'm assuming we mean messages that disappear after a certain amount of time without user intervention, they are inherently inaccessible and fail WCAG SC 2.2.1 unless you implement one of the exceptions in that SC. The general rule of thumb is that you should expect that there will always be some users who will not see the toast. Thus, you should only use them for non-critical information and there should be an alternative method for the user to get the information provided in the toast.

Since we have other options for displaying the streak information, I personally don't think we should use a toast for this.

@oriooctopus
Copy link
Contributor Author

We do use toasts for other information though, it seems to me like our criteria for using them is when they are not critical, and I wouldn't say that this information is critical. Obviously the ideal is still have everything be 100% accessible, but I'm having a hard time thinking of a good solution that wouldn't bloat the UI from a design perspective

@bbsmooth
Copy link
Contributor

bbsmooth commented Jan 8, 2023

If the streak information is going to continue to be displayed on the Profile page then yes, technically we can probably get away with using a toast here. But if the purpose of this functionality is to get people excited about their streak at the moment it happens, then using a toast is going to leave some people out of that.

@oriooctopus
Copy link
Contributor Author

To me that seems ok considering it's non essential and I assume the percentage people who won't be able to access it is < 1%. However, I heard through the grapevine that the team had a meeting about streaks as a whole and the feature is no longer something that they want, at least in regards to this expansion. @ahmadabdolsaheb @moT01 is that correct?

@moT01
Copy link
Member

moT01 commented Jan 8, 2023

We do use toasts for other information...

We don't use toasts anywhere at the moment that I know of (I know I called them toasts earlier, but I think I was wrong). We use flash messages, they stay open and visible until the user closes them. Toasts disappear on their own. I think that's the main accessibility concern with the toasts and why we don't use them.

I don't know if I like the flash messages for these. I feel like campers may get annoyed that they have to close the message between challenges when it pops up and/or it may get them out of the flow of the project. I guess if it's only a max of once per day, it isn't too bad.

Ahmad mentioned that...

Initially we could conditionally replace the quote with progress/streak related messages

I tend to go with what he says. That's how I initially thought we would implement this, but I liked @laportabellita's mocks and thought they would maybe work. There's a few concerns mentioned about the toasts, so I'm thinking that maybe it's best to just replace those existing messages when we want to display something about a streak or anything else.

the team had a meeting about streaks as a whole and the feature is no longer something that they want

I don't recall that specific thing being said in any meetings. I do recall some conversations, perhaps in meetings and/or maybe here on GitHub, about the streaks being inconsistent and sometimes inaccurate due to the complexities of timezones and because we only store a timestamp. We would need to store the timestamp and the timezone with each completed item to make it accurate I believe.

I think the streak aspect of this is a great idea, but I'm not sure it's the most important part of this issue. I think it's more about showing a message that is personal to the campers progress and to keep them motivated. I think there's other ways to do that - I mentioned a few times about other messages we could maybe use. If we decide that our streaks are too inaccurate, we could maybe find something else to display.

@oriooctopus
Copy link
Contributor Author

Yeah, I think that we could start with those messages. It doesn't really have any drawbacks and I think it would help with motivating people. The question is how will the tests look? Will people notice them? I can ask @laportabellita to try to tackle it from a design perspective if you want

@ahmaxed
Copy link
Member

ahmaxed commented Jan 26, 2023

A few updates on the prerequisites;

  1. The progress-bar pr is coming along. It just needs a few reviews.
  2. Then, the quote pr will be merged
  3. We hit the 1M events/day imitation for exporting the google analytics data to BigQuery. I am actively working to resolve that so we could proceed with A/B testing using BigQuery and Growthbook.

We could initially replace the qoute with the progress related celebratory messages and see user's behavioral change.

The only issue is that when I start A/B testing progress related donation modals, should we still keep the messages around in the lower jaw?

@oriooctopus
Copy link
Contributor Author

@ahmadabdolsaheb Is this the progress bar pr you're talking about? #49110

Then, the quote pr will be merged
Is there an existing quote PR?

@ahmaxed
Copy link
Member

ahmaxed commented Feb 8, 2023

This is the one: #46811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. type: feature request Threads classified to be feature requests. Implementation to be considered as a nice to have
Projects
None yet
Development

No branches or pull requests

9 participants