Page MenuHomePhabricator

Users should be able to subscribe to newsletters without JavaScript
Closed, ResolvedPublic

Description

Special:Newsletters subscription functionality only works if JavaScript is enabled and users without js cannot subscribe/unsubscribe from newsletters. This is a really bad idea.

It should work for users with JavaScript disabled as well. See progressive enhancement (core functionality should be available for all users and js should be only used for enhancing it).

Event Timeline

Glaisher raised the priority of this task from to Needs Triage.
Glaisher updated the task description. (Show Details)
Glaisher subscribed.
Qgil triaged this task as Low priority.Aug 26 2015, 8:33 AM
Qgil subscribed.

Yes, we have discussed about this, but decided to leave it out of scope for GSoC. A couple of questions to define the right priority of this task:

  • how difficult is to support the current features without JS?
  • how strong is the no-JS use case / recommendation for new extensions being deployed in Wikimedia?
  • how difficult is to support the current features without JS?

It's not possible to implement the current behavior without JS (listening to the event and then making the necessary changes to the db immediately). We would have to implement a way to submit a form with PHP.

  • how strong is the no-JS use case / recommendation for new extensions being deployed in Wikimedia?

It's a must for basic functionalities Currently, the only way to subscribe and unsubscribe is through this page's JS or through API. This means that a subset of users would be unable to make use of a core functionality provided by the extension. Using only JS for basic functionality is considered a really bad practice in web designing. See the link in the description.

I think we should remove the subscribe column entirely from this view and have something like Special:Newsletter/$1 for subscribing and viewing information about the newsletters (something similar to what Special:AbuseFilter does) TablePager is not really meant for writing. Additionally, most users would not be familiar with this behavior that radio buttons change data immediately without clicking on a submit button. I also don't think it would work well on huge wikis like English Wikipedia where there would be lots of newsletters and then a submit button somewhere at the top and/or bottom.

We could probably let users subscribe with JS from this list view later in the future but in my opinion, some other method should be implemented, not radio buttons. It should also show the user a success message box that the user has been subscribed instead of just incrementing the subscribers' count.

@Glaisher, how about having sections with textboxes, drop downs, a submit button like the one used for announcing a new issue or to add a publisher in Special:NewsletterManage ?

@Glaisher, how about having sections with textboxes, drop downs, a submit button like the one used for announcing a new issue or to add a publisher in Special:NewsletterManage ?

I was thinking that we should create two special pages. (see T107555) Special:Newsletter/$1 for mananging, subscribing and other actions related to specific newsletters. And Special:Newsletters for listing all the newsletters with TablePager. Does that sound okay?

Qgil raised the priority of this task from Low to Medium.Aug 28 2015, 11:37 AM

No subscribing in Special:Newsletters? Browsing + subscribing sounds like one action. Then managing (including unsubscribing) in another page is fine.

Change 236571 had a related patch set uploaded (by Glaisher):
Implement Special:Newsletter

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

No subscribing in Special:Newsletters? Browsing + subscribing sounds like one action. Then managing (including unsubscribing) in another page is fine.

I meant a separate page so that non-JS users would be able to subscribe. In the future, we should implement a JS solution on Special:Newsletters but it won't be done in the patch above (and try to make Special:Newsletters open to public; not only for logged-in users).

Glaisher renamed this task from Special:Newsletters' subscribe functionality should work without JavaScript to Users should be able to subscribe to newsletters without JavaScript.Sep 7 2015, 5:41 PM
Glaisher set Security to None.

I meant a separate page so that non-JS users would be able to subscribe.

Understood, I agree, and sorry that it took so long to respond. :)

Change 236571 merged by jenkins-bot:
Implement Special:Newsletter

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

Now pages like http://newsletter-test.wmflabs.org/wiki/Special:Newsletter/1 allow all users (non-JS too) to change their subscription to a newsletter. What I haven't found yet is how users can reach these pages.

I left it out intentionally in that patch. Will add a link to it from Special:Newsletters in a follow up patch.

Special:Newsletters would now link to the Special:Newsletter page where users can subscribe. "Users should be able to subscribe to newsletters without JavaScript" is now fixed, this can be closed now. Improving subscription feature on Special:Newsletters is being tracked at T111711