Page MenuHomePhabricator

Create error states for Special:InvitationList
Closed, ResolvedPublic

Description

Acceptance criteria

Acceptance Criteria:

  • Given that an organizer opens Special:InvitationList (with no list ID),
    • Then they should be redirected to Special:MyInvitationLists
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that does not exist,
    • Then they should see the following error:
      • This invitation list does not exist. [[Special:MyInvitationLists | View your invitation lists ]].
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that is invalid,
    • Then they should see the following error:
      • Provide a valid invitation list ID. [[Special:MyInvitationLists | View your invitation lists ]].
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that was not created by the current user,
    • Then they should see the following error:
      • You don't have permission to view this invitation list because you didn't create it. [[Special:MyInvitationLists | View your invitation lists ]].

Event Timeline

@ifried @gonyeahialam do you have any ideas for these three messages? For comparison, here's what we're doing in Special:EventDetails:

No ID provided:

image.png (485×991 px, 21 KB)

Event does not exist:

image.png (485×991 px, 22 KB)

Note, the existing behaviour should ideally be changed as per T348283, so we don't actually have to display an error, especially in the scenario where no ID is provided (e.g., it could redirect to Special:MyInvitationLists instead).

Here are my suggestions @Daimona

Given that an organizer opens Special:InvitationList (with no list ID),
Then they should see the following error:
Redirect to Special:MyInvitationLists
Given that an organizer opens Special:InvitationList/X, where X is a list ID that does not exist,
Then they should see the following error:
"This invitation list doesn't exist. To view your lists, go to [Special:MyInvitationLists]."
Given that an organizer opens Special:InvitationList/X, where X is a list ID that was not created by the current user,
Then they should see the following error:
"You don't have permission to view this invitation list because you didn't create it. To view your lists, go to [Special:MyInvitationLists]."

Given that an organizer opens Special:InvitationList (with no list ID),
Then they should be redirected to Special:MyInvitationLists

SGTM.

Given that an organizer opens Special:InvitationList/X, where X is a list ID that does not exist,
Then they should see the following error:
"This invitation list doesn't exist. To view your lists, go to [Special:MyInvitationLists]."
Given that an organizer opens Special:InvitationList/X, where X is a list ID that was not created by the current user,
Then they should see the following error:
"You don't have permission to view this invitation list because you didn't create it. To view your lists, go to [Special:MyInvitationLists]."

Both messages look good to me, my only question is whether we can avoid displaying the special page name, and instead do something like Blah blah blah. [[Special:MyInvitationLists |View your lists]]..

Given that an organizer opens Special:InvitationList (with no list ID),
Then they should be redirected to Special:MyInvitationLists

SGTM.

Given that an organizer opens Special:InvitationList/X, where X is a list ID that does not exist,
Then they should see the following error:
"This invitation list doesn't exist. To view your lists, go to [Special:MyInvitationLists]."
Given that an organizer opens Special:InvitationList/X, where X is a list ID that was not created by the current user,
Then they should see the following error:
"You don't have permission to view this invitation list because you didn't create it. To view your lists, go to [Special:MyInvitationLists]."

Both messages look good to me, my only question is whether we can avoid displaying the special page name, and instead do something like Blah blah blah. [[Special:MyInvitationLists |View your lists]]..

Yes

@ifried Can you confirm you are happy with the messages above.

Text updated in team meeting and approved

Eh, on second thought, we also need a message for when an invalid ID is provided, i.e., something that is not a number. For comparison, on Special:EventDetails we use the following message:

Provide a valid event ID.

@ifried @gonyeahialam

Change #1052145 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] [WIP] Add error states for Special:InvitationList

https://gerrit.wikimedia.org/r/1052145

Eh, on second thought, we also need a message for when an invalid ID is provided, i.e., something that is not a number. For comparison, on Special:EventDetails we use the following message:

Provide a valid event ID.

@ifried @gonyeahialam

Can't we treat it the same as an ID that does not exist

Eh, on second thought, we also need a message for when an invalid ID is provided, i.e., something that is not a number. For comparison, on Special:EventDetails we use the following message:

Provide a valid event ID.

@ifried @gonyeahialam

Can't we treat it the same as an ID that does not exist

Yes, we can do that.

ifried updated the task description. (Show Details)

Hello, @Daimona & @gonyeahialam, I have updated the AC. I decided to include a different message for invalid ID, since I thought a message that is specific to this error would a) be more helpful to the user, and b) follow similar behavior found elsewhere (i.e., in Special:EventDetails). Let me know what you think and if you have any concerns. Thanks!

Hello, @Daimona & @gonyeahialam, I have updated the AC. I decided to include a different message for invalid ID, since I thought a message that is specific to this error would a) be more helpful to the user, and b) follow similar behavior found elsewhere (i.e., in Special:EventDetails). Let me know what you think and if you have any concerns. Thanks!

LGTM, thanks.

Change #1052145 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add error states for Special:InvitationList

https://gerrit.wikimedia.org/r/1052145

Hello, @Daimona & @gonyeahialam, I have updated the AC. I decided to include a different message for invalid ID, since I thought a message that is specific to this error would a) be more helpful to the user, and b) follow similar behavior found elsewhere (i.e., in Special:EventDetails). Let me know what you think and if you have any concerns. Thanks!

It is okay

Change #1053978 had a related patch set uploaded (by Vaughn Walters; author: Vaughn Walters):

[mediawiki/extensions/CampaignEvents@master] Remove space before the period at the end of a sentence.

https://gerrit.wikimedia.org/r/1053978

Change #1053978 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Remove space before the period at the end of a sentence.

https://gerrit.wikimedia.org/r/1053978

vaughnwalters subscribed.

Acceptance Criteria:

  • Given that an organizer opens Special:InvitationList (with no list ID),
    • ✅ Then they should be redirected to Special:MyInvitationLists
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that does not exist,
    • Then they should see the following error:
      • ✅ This invitation list does not exist. [[Special:MyInvitationLists | View your invitation lists ]].
      • Screenshot 2024-07-12 at 2.11.34 PM.png (492×1 px, 46 KB)
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that is invalid,
    • Then they should see the following error:
      • ✅ Provide a valid invitation list ID. [[Special:MyInvitationLists | View your invitation lists ]].
      • Screenshot 2024-07-12 at 4.21.10 PM.png (434×1 px, 39 KB)
      • This needs the space removed from it before the period.
  • Given that an organizer opens Special:InvitationList/X, where X is a list ID that was not created by the current user,
    • Then they should see the following error:
      • ✅ You don't have permission to view this invitation list because you didn't create it. [[Special:MyInvitationLists | View your invitation lists ]].
      • Screenshot 2024-07-12 at 2.35.02 PM.png (728×1 px, 86 KB)

This has been released and looks good on the beta cluster, so I'm marking this as Done.