Page MenuHomePhabricator

Configure usergroup request form using ContactPage for AffCom
Closed, ResolvedPublic

Description

AffComm would like to have a custom contact form to handle new user group applications. They would like to have this form available on metawiki before 2015-05-01. @Slaporte has a mockup of the desired form.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@bd808: Are you intending to assign this to yourself, or should we be handling it with the other config change requests?

bd808 added a comment.Apr 13 2015, 4:12 PM

Getting the wiki page that I took the mock screen shot from moved to a non-private wiki would be optimal so that the desired messages are cut-n-paste friendly rather than needing to be retyped by a developer. @Slaporte can you be responsible for doing that and then linking the wiki page here on the task?

Krenair assigned this task to Slaporte.Apr 13 2015, 4:49 PM

Getting the wiki page that I took the mock screen shot from moved to a non-private wiki would be optimal so that the desired messages are cut-n-paste friendly rather than needing to be retyped by a developer. @Slaporte can you be responsible for doing that and then linking the wiki page here on the task?

I added the mockup here: https://www.mediawiki.org/wiki/User:Slaporte_(WMF)/Draft_form

Thanks!

Krenair claimed this task.Apr 13 2015, 7:01 PM

I think we can do most of this. HTMLForm does like to make things awkward though.

Krenair added a comment.EditedApr 13 2015, 11:59 PM

So, here's the issues that I've found so far:

  • "Your name", "Your address", and "Subject" are forced by the extension. (Not sure we want "Subject"? Hmm.)
  • HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...
  • The terms and conditions checkbox will probably have to be squashed over to the right.

We can probably fix or hack around all of these.

  • HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...

Create a new class which inherits from HTMLRadioField to override formatOptions and append the extra text to the end.

  • The terms and conditions checkbox will probably have to be squashed over to the right.

Create a new class which inherits from HTMLCheckField returning '' for getInputHTML and parent::getInputHTML( '' ) for getLabel.

  • "Your name", "Your address", and "Subject" are forced by the extension. (Not sure we want "Subject"? Hmm.)

Can probably turn those simple array additions into array_merges? Also not sure about the "Email me a copy of my message" box at the bottom right. @Slaporte? Would it be helpful if I showed what I already have?

Hi @Krenair, thanks for working on this!

So, here's the issues that I've found so far:

  • "Your name", "Your address", and "Subject" are forced by the extension. (Not sure we want "Subject"? Hmm.)

It's OK to keep "your name" and "your address" options. I would prefer if the subject was pre-filled or not customizable at all. Ideally, the subject would be: "User group request: $name." Is that possible?

  • HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...

Does this look good?

  • The terms and conditions checkbox will probably have to be squashed over to the right.

This is OK if it looks good. The Terms and Conditions checkbox should be mandatory, too. Is that possible?

Can probably turn those simple array additions into array_merges? Also not sure about the "Email me a copy of my message" box at the bottom right. @Slaporte?

We can keep the "email me a copy" option.

Would it be helpful if I showed what I already have?

Yes, I would like to see the working version. Thanks again!

is what I have so far.

I should warn you the output format is not pretty. It's quite broken, in fact. Looks like I need to file a bug or two against ContactPage

Krenair added a comment.EditedApr 14 2015, 8:55 PM

So, here's the issues that I've found so far:

  • "Your name", "Your address", and "Subject" are forced by the extension. (Not sure we want "Subject"? Hmm.)

It's OK to keep "your name" and "your address" options. I would prefer if the subject was pre-filled or not customizable at all. Ideally, the subject would be: "User group request: $name." Is that possible?

Could probably use more hacks to hide the field and force that subject...

  • HTMLForm won't (easily) let us put that text below the logo options, it might have to go in with the label...

Does this look good?

  • The terms and conditions checkbox will probably have to be squashed over to the right.

This is OK if it looks good. The Terms and Conditions checkbox should be mandatory, too. Is that possible?

Ignore these parts, see the later comments I made where I had worked out how to workaround the issues. I think it's possible to make the terms and conditions checkbox required.

This is looking good!

Can we add a small consistent margin between each row of inputs and labels, on the top or bottom? I also see that the first few labels (Your name, your email address, subject) are not bold like the rest. Also, can we use the nice styled buttons? I am not sure how consistently they are used in the MW interface.

Change 204203 had a related patch set uploaded (by Alex Monk):
Add ContactPage messages for affcom user group form

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

Change 204205 had a related patch set uploaded (by Alex Monk):
Add AffCom user group application contact page on meta

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

I also see that the first few labels (Your name, your email address, subject) are not bold like the rest.

This part is fixed in my working version now.

I've uploaded commits with most of the bits and pieces... Just missing some CSS, which is incomplete because I haven't addressed these comments yet:

Can we add a small consistent margin between each row of inputs and labels, on the top or bottom?

Also, can we use the nice styled buttons? I am not sure how consistently they are used in the MW interface.

@Slaporte: The first thing is probably something you can try with CSS when it goes up.
The second thing... We can probably add that in as a hack if you really want it... Might be easier with extra custom CSS.

Anyway here's the CSS I was already working with. It'll need to be put on metawiki somewhere when the config change gets deployed:

#affcom-contact-form .mw-label {
	text-align: left;
}
#affcom-contact-form table {
	padding: 1em;
	font-size: 1.15em;
}
#affcom-contact-form tbody > :nth-child(1) .mw-label,
#affcom-contact-form tbody > :nth-child(2) .mw-label {
	font-weight: bold;
}
#affcom-contact-form tbody > :nth-child(4) {
	display: none;
}

The second thing... We can probably add that in as a hack if you really want it... Might be easier with extra custom CSS.

We could do it directly in the extension for all the forms. Should be easy enough since it's using HTMLForm.

@Slaporte: What user do we want these to send to?

@Glaisher: Want to help out? :)

@Slaporte: What user do we want these to send to?

I setup an account: User:Usergroups to receive this form. Thanks!

In future it's probably a better idea to create the account while logged in... Anyway I made a tiny user page for it and updated the config change commit.

We should try to make sure https://gerrit.wikimedia.org/r/204203 gets approved before 2015-04-22 (i.e. before 1.26wmf3 branching).

After that I think we can deploy https://gerrit.wikimedia.org/r/204205 on 2015-04-28 evening (i.e. after 1.26wmf23 goes to metawiki).

I setup an account: User:Usergroups to receive this form. Thanks!

Hmm. The username should probably contain "WMF" in it. ping @Jalexander

or not perhaps since it's a community-run committee?

Change 204203 merged by jenkins-bot:
Add ContactPage messages for affcom user group form

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

bd808 moved this task from To Do to In Dev/Progress on the User-bd808 board.Apr 24 2015, 6:18 PM

Although I'd usually deploy these changes, I've asked @bd808 to step in and make sure it gets done due to the need to start focusing on my exams rather than Wikimedia things.

Change 206424 had a related patch set uploaded (by BryanDavis):
beta: Import $wmfUdp2logDest global in wmfLabsSettings()

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

bd808 added a comment.Apr 24 2015, 6:40 PM

Change 206424 had a related patch set uploaded (by BryanDavis):
beta: Import $wmfUdp2logDest global in wmfLabsSettings()

Sorry, wrong ticket

bd808 claimed this task.Apr 24 2015, 10:11 PM

Stealing this from @Krenair after he's done all the hard work so I don't forget to do the deploy once 1.26wmf3 is live on metawiki.

Change 204205 merged by jenkins-bot:
Add AffCom user group application contact page on meta

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

Change 207319 had a related patch set uploaded (by BryanDavis):
Fix noc symlink

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

Change 207319 merged by jenkins-bot:
Fix noc symlink

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

The patch in https://gerrit.wikimedia.org/r/204205 needs the noc symlink fixed. It also needs a guard in EmailUserForm hook to make sure it is dealing with the correct form. Reverted shortly after deploy. Will investigate a fix and try again.

I got a list bounce message from the form too:

Your mail to 'Usergroups' with the subject

    User group request: just testing the new form (from BDavis (WMF))

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Post by non-member to a members-only list

Change 207332 had a related patch set uploaded (by Alex Monk):
Revert "Revert "Add AffCom user group application contact page on meta""

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

In addition to the issue with the email actually being sent, a user will need to set up the CSS and ensure that the links actually point to valid pages. These aren't sysadmin tasks.

@bd808, I adjusted the list settings to accept emails from the form.

Change 207804 had a related patch set uploaded (by BryanDavis):
More ContactPage messages for affcom user group form

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

bd808 added a comment.Apr 30 2015, 3:41 PM

New and improved screenshot with mediawiki.ui styling:

Requires this CSS on the target wiki (metawiki for prod):

body.page-Special_Contact_affcomusergroup .firstHeading {
   background-color: #2f6fab;
   color: #fff;
   padding: .5em;
   text-align: center;
}
#contactpage-affcomusergroup {
  width: inherit;
}
#contactpage-affcomusergroup .mw-ui-radio label,
#contactpage-affcomusergroup > div > :nth-child(1) label,
#contactpage-affcomusergroup > div > :nth-child(2) label {
   font-weight: bold;
 }
#contactpage-affcomusergroup > div > :nth-child(3),
#contactpage-affcomusergroup > div > :nth-child(4) {
   display: none;
}
#contactpage-affcomusergroup label > ul {
   list-style: none;
   padding: 0;
   margin: 0;
}

I'm going to try and come up with a reasonable way to include that CSS via ResourceLoader but if that falls through we can just get the global CSS edited.

Change 207804 merged by jenkins-bot:
More ContactPage messages for affcom user group form

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

Change 207912 had a related patch set uploaded (by BryanDavis):
Allow loading of ResourceLoader modules

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

Change 207916 had a related patch set uploaded (by BryanDavis):
Add RL module for [[:meta:Special:Contact/affcomusergroup]]

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

bd808 added a comment.Apr 30 2015, 8:51 PM

I'm going to try and come up with a reasonable way to include that CSS via ResourceLoader but if that falls through we can just get the global CSS edited.

The patches are now in review that will stick the CSS into the WikimediaMessages extension so that no on-wiki changes are needed to support the pretty contact form. When they are merged I will need to backport the latest ContactPage and WikimediaMessages extensions to 1.26wmf4 which will go live on metawiki on 2015-05-05. At that point we can apply the config changes to setup the form and make it live.

Change 207912 merged by jenkins-bot:
Allow loading of ResourceLoader modules

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

bd808 raised the priority of this task from Normal to High.Apr 30 2015, 9:46 PM

Change 207916 merged by jenkins-bot:
Add RL module for [[:meta:Special:Contact/affcomusergroup]]

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

bd808 added a comment.May 1 2015, 4:31 PM

Enabling patches are all merged now. Backports of ContactPage and WikimediaMessages extensions to 1.26wmf4 need to be prepared and scheduled for a deploy window next week. This will require a full scap, so it needs a distinct window rather than riding with SWAT.

Change 208689 had a related patch set uploaded (by BryanDavis):
More ContactPage messages for affcom user group form

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

Change 208690 had a related patch set uploaded (by BryanDavis):
Add RL module for [[:meta:Special:Contact/affcomusergroup]]

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

Change 208693 had a related patch set uploaded (by BryanDavis):
Allow loading of ResourceLoader modules

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

Change 208689 merged by jenkins-bot:
More ContactPage messages for affcom user group form

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

Change 208690 merged by jenkins-bot:
Add RL module for [[:meta:Special:Contact/affcomusergroup]]

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

Change 208693 merged by jenkins-bot:
Allow loading of ResourceLoader modules

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

Change 208702 had a related patch set uploaded (by BryanDavis):
Update ContactPage and WikimediaMessages for AffCom contact form

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

Change 208702 merged by jenkins-bot:
Update ContactPage and WikimediaMessages for AffCom contact form

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

bd808 added a comment.May 4 2015, 10:49 PM

Enabling patches are all merged now. Backports of ContactPage and WikimediaMessages extensions to 1.26wmf4 need to be prepared and scheduled for a deploy window next week. This will require a full scap, so it needs a distinct window rather than riding with SWAT.

The backport to 1.26wmf4 has been pushed to the WMF production cluster. Tomorrow (2015-05-05) the 1.26wmf4 branch will go live on metawiki. I've scheduled the config patch to create the form there to go out in the evening SWAT window following the version bump.

Change 207332 merged by jenkins-bot:
Add AffCom user group application contact page on meta (take 2)

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

bd808 moved this task from In Dev/Progress to Done on the User-bd808 board.May 6 2015, 2:15 AM
Mjbmr moved this task from To deploy to Done on the Wikimedia-Site-requests board.May 6 2015, 11:25 PM
bd808 moved this task from Done to Archive on the User-bd808 board.May 12 2015, 6:23 AM