Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Add a playground group in the group list #914

Closed
2 of 3 tasks
djahnie opened this issue Feb 28, 2018 · 11 comments
Closed
2 of 3 tasks

Add a playground group in the group list #914

djahnie opened this issue Feb 28, 2018 · 11 comments

Comments

@djahnie
Copy link
Member

djahnie commented Feb 28, 2018

Right now the group list is the landing page. Probably a lot of people come to karrot.world and just want to try it out. It would be great if they didn't have to create an account, or if they wouldn't randomly join open groups. My proposal is the following:

  • Take one of the unused groups, rename it to 'Playground' and write a login in the public description.
  • Display the playground group as the very first in the group list.
  • Add a yellow frame around it to make it even more salient.

Any resistance to me tackling this?

@djahnie djahnie self-assigned this Feb 28, 2018
@D0nPiano
Copy link
Contributor

I really like the idea! A couple of questions though.

  • How are we keeping the playground user from entering other groups?
  • Is renaming the group sufficient or should it be translatable?
  • Are we keeping people from changing the password for the demo group?

Therefore, I am unsure if it wouldn't be easier to just deploy a demo version of karrot to demo.karrot.world and add a demo user (or multiple ones) there, since the demo user cannot mess with the production database then. The database could also be copied and replaced to the original then from time to time. If you feel confident to prevent the demo user from changing non-demo data though, I am happy either way.

@djahnie
Copy link
Member Author

djahnie commented Feb 28, 2018

Oh, very good points you have there, @D0nPiano!

  • I didn't think of that, you're right. But actually, users who just wan't to play around will probably not make the effort of joining a whole lot of groups, I guess. If they wanted to, they could always make an account for themselves and just hop into any unprotected group they want to, so this is not really a big deal for me... (Also, as soon as we have the autoremoval of inactive users (Mark and remove inactive users from a group #868) this won't be grave anyways...)
  • Having it translatable would be fancy, for sure! But how would this work? Normally group names are not translatable, so how can we just make this one group name different?
  • Sounds reasonable, yes. Okay, looks like this group would have unique features in more than one way...

I'd love to have the playground directly in production, so that the demo experience is closest to what actual users have. That's also why I'm more in favor of this solution than linking to dev.karrot.world and giving out foo for testing purposes. I think it could confuse some users...

@D0nPiano
Copy link
Contributor

D0nPiano commented Feb 28, 2018

Yeah, makes sense. I just usually think I can't destroy anything when I am on a demo page, wherefore I just click around randomly. Especially because you are anonymous as a demo user and don't even have to provide an email address for signing in.

I think having it translatable is just as complicated as adding a yellow frame. The playground group should probably be named "Playground", and the vue store could then filter out the group and do something like

if (group.name === 'Playground') {
   group.name === $t('PLAYGROUND.TITLE')
}

Furthermore, the demo user should also be special (also a special name? or another special attribute?). This could open possibilities like disabling buttons if it is the current user

<q-btn disable="user.name === 'Playground User'">Join Group</q-btn>

...it's not a perfectly safe solution (since not done in backend) but would still be good enough I think. And I can see your point why it would be nicer in production.

@tiltec
Copy link
Member

tiltec commented Feb 28, 2018

Good idea!
Just an additional thought: if we want to have custom behavior for playground group at some point, it could make sense to have it marked in the database. I'm thinking of two initial pieces here: a new field that marks a group as playground and new database migration that creates the testgroup.

@nicksellen
Copy link
Member

A script could reset the playground group + users to a certain state periodically. So, kick the playground users out of any other groups they wandered into, kick any other random users out of the playground group, and set the data back sensible defaults.

@tiltec
Copy link
Member

tiltec commented Feb 28, 2018

With "playground user", do you mean predefined users with predefined password? I would find it nice if I can join the playground group with my personal user account and not getting kicked out of my other groups ;)

@djahnie
Copy link
Member Author

djahnie commented Mar 2, 2018

So I renamed group 16 to PLAYGROUND and wrote encouraging things in the description. How about a login? I guess a special demo user would need to be created in the backend..?

@tiltec
Copy link
Member

tiltec commented Mar 3, 2018

I'll add a group status field, replacing the newly created active field. It can be set to values active, inactive or playground, because they seem mutually exclusive. I discussed it with @nicksellen and it seems to make most sense to do it like this right now.

@tiltec
Copy link
Member

tiltec commented Mar 11, 2018

I'll implement the playground group into the frontend. It will

  • offer the user to join the playground group after signup
  • show the playground group at the bottom of the group list and mark it if the user is logged in
  • don't show the playground group if the user is logged out (because it's not a real foodsaving group)
  • show a persistent alert if the user is on a playground group page
  • disable a few options, e.g. to change the group password

Backend-related changes:

  • it would be good to disable email notifications by default for the playground group
  • disable the group password option permanently

@tiltec
Copy link
Member

tiltec commented Mar 13, 2018

#960 is ready for review :)

@tiltec
Copy link
Member

tiltec commented Mar 18, 2018

Playground group is in place, let's see how it turns out. I would close this issue now. We can open another one for the playground user if we want.

@tiltec tiltec closed this as completed Mar 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants