Page MenuHomePhabricator

Encourage users to log in: wish form
Open, MediumPublic

Description

User story
Given that I am on the wish submission form and am not logged in, I should see a notification to log in to submit a wish.

Acceptance criteria

  • When the user is not logged in, on pageload, the user should see a notification to log in.
  • The form should not accept a wish submission if a user is not logged in.
  • When the user submits the form and the user is not logged in, show a dialog to log in.

Details

TitleReferenceAuthorSource BranchDest Branch
Don't load gadget for logged-out users and show message to log inrepos/commtech/wishlist-intake!69musikanimallogged-out-msgmain
DeploymentCommand: add user-group-css task for user group CSSrepos/commtech/wishlist-intake!57musikanimalanon-textmain
Show codex dialog if user is not logged inrepos/commtech/wishlist-intake!56samtarT363221main
Customize query in GitLab

Event Timeline

JWheeler-WMF raised the priority of this task from Low to Medium.
JWheeler-WMF updated the task description. (Show Details)

I wonder if a dialog is the right approach here. For starters, Codex dialogs evidently are supposed to be dismissable. They also state dialogs should not be used when "the information can be displayed inline within the main interface", which is the case here:

For the gadget

  • We can rely on the fallback text that currently lives at [[Community Requests/Intake]]. Just add the text at the top with a link to login.
  • We can use user group CSS to show different messaging depending on if you're logged in.
    • Wrap text you want only shown to anonymous users with <div class="anonymous-show">
    • Wrap text to be shown only for logged-in users with <div class="user-show">.
  • Change the gadget definition to have rights=editmyusercss so that the gadget only loads for logged-in users. This is better for performance.
  • We can use the title denylist to entirely disable editing of subpages of [[Community Requests]] for anonymous users, and show custom messaging.

For the extension (later)

Even if we kept with the wikitext-based fallbacks (TBD), we should still have a safety net similar to what this task is asking for, but I don't think we should load the form at all for logged in users, if they aren't meant to be able to use it. Instead, we'd likely have wish editing on a Special page, so we just put the normal permission checks behind it with some custom messaging if we want, similar to i.e. https://ee.wikipedia.org/wiki/Special:Block (assuming no one reading this is an admin there).

@JWheeler-WMF any opposition to what I'm proposing at T363221#9849068? The short of is, instead of showing the form with a dialog (not recommended by Codex), we show the message before we even load the Vue application. In fact, the gadget should not run at all for logged out users, as it is only used for editing. This is also better for performance, since we don't want to load the giant JS payload for users who won't be able to make use of it.

So a logged out user would visit i.e. [[Community Requests/Intake]] and see a message like "Sorry, Community Requests requires you be logged in to submit ideas" (or whatever the language is following the naming decision), and a link to login.

That sound okay?