Right now, there is a problem where if you try to send someone an invite but they have another pending, you cannot send the invitation. Users should be allowed to have multiple invites pending, and when they choose a Party, the other Party invites should be automatically rejected. (Note that this should not happen with Guilds.)
To any developer who works on this:
Invitations are currently stored like this in the user document:
"invitations": {
"party": {}, // one invitation
"guilds": [] // an array of objects (one object per invitation)
},
The party invitation will need to be changed to an array of objects. This will require that all existing party invitations in the database be converted to the new format, using a migration script. An admin will run the migration when the time comes.
Y'all realize changing the data structure is a breaking change, right?
Agreed that we cannot just change invitations.party to an array. It'll break mobile apps and any integration that relies on it.
What we could do is to use a query parameter to return an array instead of an object but it's going to be confusing
We could put all party invitations into invitations.parties (an array of objects), and also put the most recent one into invitations.party (an object, as now). Maybe after a few months we could deprecate invitations.party by leaving it as an empty {} permanently (non-updated clients would then never show an invitation but wouldn't break fatally). Regardless of how it's done, a migration will be needed to avoid losing existing invitations.
Another thing for whichever contributor who works on this to keep in mind is that it should be VERY clear to the player that they can accept only one invitation, and that once they're in a party, they can't get any more invitations until they leave. Both are common questions or sources of confusion for new users. The page that lists all invitations should explain this, as should the confirmation popup for when you're accepting one (no need to put it on the confirmation for rejecting one). It would be nice if, after you've accepted an invitation, you see a notification saying that all other(s) have been rejected (only if there were others).
@Alys - would it be okay if I took a stab at this? I read through the blacksmith guidance page and I'd like to give it a go. If there are any new developments please let me know!
@eternal44 That would be great, thank you! You're welcome to ask here if you run into any problems or have any questions.
@Alys - I wrote out the backend to meet the specs you described but wasn't sure how you wanted to display all of the pending invitations without dramatically changing the layout. Any thoughts?
@eternal44 Thank you for that! But I have no thoughts at all I'm afraid.
@lemoness Did you have any designs for how multiple invitations should be displayed or any words for describing the details? These were my thoughts (from a comment above) about what the wording would need to describe:
"it should be VERY clear to the player that they can accept only one invitation, and that once they're in a party, they can't get any more invitations until they leave. Both are common questions or sources of confusion for new users. The page that lists all invitations should explain this, as should the confirmation popup for when you're accepting one (no need to put it on the confirmation for rejecting one). It would be nice if, after you've accepted an invitation, you see a notification saying that all other(s) have been rejected (only if there were others)."
I didn't have any designs, but here is some wording:
"You have multiple party invitations! Choose wisely, because you can only
be in one party at a time."
Confirmation:
"Are you sure you want to join the party "NAME"? You can only be in one
party at a time."
After accepting:
"Hurrah! You have joined the party "NAME. All other party invitations have
been cancelled. Enjoy your new party!"
Can we check if the P in party is always capitalized? I think it might be.
On Mon, Aug 15, 2016 at 2:15 AM, Alys [email protected] wrote:
@eternal44 https://github.com/eternal44 Thank you for that! But I have
no thoughts at all I'm afraid.@lemoness https://github.com/lemoness Did you have any designs for how
multiple invitations should be displayed or any words for describing the
details? These were my thoughts (from a comment above) about what the
wording would need to describe:"it should be VERY clear to the player that they can accept only one
invitation, and that once they're in a party, they can't get any more
invitations until they leave. Both are common questions or sources of
confusion for new users. The page that lists all invitations should explain
this, as should the confirmation popup for when you're accepting one (no
need to put it on the confirmation for rejecting one). It would be nice if,
after you've accepted an invitation, you see a notification saying that all
other(s) have been rejected (only if there were others)."—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/HabitRPG/habitrpg/issues/7792#issuecomment-239760638,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADVQwRsc9wzrvp2jXZcbg3ZDPqZSykpbks5qgC4ygaJpZM4JN3I7
.
What is the status on this?
@MathWhiz - no active development on my end.
@eternal44 Did you quit fixing this issue?
@Alys Is this still expected to be done? If yes, may I finish it?
All yours
On Apr 17, 2017 9:38 PM, "Mateus Etto" notifications@github.com wrote:
@eternal44 https://github.com/eternal44 Did you quit fixing this issue?
@Alys https://github.com/Alys Is this still expected to be done? If yes,
may I finish it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/HabitRPG/habitica/issues/7792#issuecomment-294675276,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEYpSHtV_uew89Qc7PAPcOKu_tG4G6lvks5rxD41gaJpZM4JN3I7
.
There's a PR for this now so we should settle on how we're going to handle the possibility of this being a breaking change. I'm commenting here instead of in the PR since we've already started discussing it here. The discussion starts at https://github.com/HabitRPG/habitica/issues/7792#issuecomment-233097683
The PR is https://github.com/HabitRPG/habitica/issues/8683 and currently I think it would be a breaking change but as @Yutsuten says it's a WIP.
@paglias @SabreCat @TheHollidayInn @crookedneighbor @Yutsuten Any comments?
We might need a migration too but we can talk about that once the PR is closer to being finished. I'm mentioning it now so we don't forget later.
For testing the migration, I can do tests by switching between branches develop and the one with the invite changes. I don't have idea of how I could create the migration, but I may learn. :)
I know we may have some undesired eventualities, but from my part I'll do my best to make things happen with no problems...
Most helpful comment
I didn't have any designs, but here is some wording:
"You have multiple party invitations! Choose wisely, because you can only
be in one party at a time."
Confirmation:
"Are you sure you want to join the party "NAME"? You can only be in one
party at a time."
After accepting:
"Hurrah! You have joined the party "NAME. All other party invitations have
been cancelled. Enjoy your new party!"
Can we check if the P in party is always capitalized? I think it might be.
On Mon, Aug 15, 2016 at 2:15 AM, Alys [email protected] wrote: