Skip to content

Instantly share code, notes, and snippets.

View catrope's full-sized avatar

Roan Kattouw catrope

  • Wikimedia Foundation
  • San Francisco, CA
View GitHub Profile
@catrope
catrope / gist:d2874b18ce249cd2779a084f59f766c8
Created April 28, 2016 03:35
Cross-wiki notification beta feature usage as of 2016-04-28 03:30 UTC
Total: 18084 across 369 wikis
6255 enwiki
1065 frwiki
1002 ruwiki
914 eswiki
887 dewiki
793 commonswiki
618 zhwiki
465 arwiki
Echo
a9c6515 Fix regression from 0fc63bde365: unbreak number formatting in short timestamps
f3ce2de Add tooltips for 'mark as read' and 'more options'
bb1192a Increase line-height for survey to 16px
f9d2aac Browser tests: fix nojs tests
b913601 Use plaintextParams() for snippets and sections
62216ca Display only one foreign bundle on mobile
2851419 Bold 'talk page' in edit-user-talk bundled notification
6c49d3e Update OOUI hacks for I8987dade5ed
c9332d8 Apply momentjs hack for short relative times on mobile too
Echo
a9c6515 Fix regression from 0fc63bde365: unbreak number formatting in short timestamps
Flow
b0a775e Use topic-of-post-text-from-html for all UI purposes, never use topic-of-post
19202d3 Use plaintext for topic titles in resolved notification
3097ea3 Fix sink-handling
7846c6a Remove revision range
4f7e0b4 Mark rev_content_model as code per request
Echo
bdb50c7 Update notifications when reopening the popup
a4ea2de FooterNoticeWidget: Set image height explicitly
732c849 Also show the survey tooltip on click
f35251f Never show a negative number in the notifications badge
Flow
c2c86e5 Flow dumps XSD schema
7854141 Show cursor:pointer on things that toggle expand/collapse of resolved topics
c84f438 Fix new topic notifications
@catrope
catrope / cross-wiki-results.txt
Last active March 23, 2016 19:47
Cross-wiki notifications data 2016-03-23
# NOTE: Notifications counts are capped at 100 per user per wiki per type (alerts vs messages).
# This means that a user who has 800 alerts on enwiki will be counted as having 100 notifications,
# but a user who has 400 alerts and 400 messages on enwiki will be counted as having 200 notifications,
# and a user who has 400 alerts on enwiki and 400 alerts on commonswiki will also be counted as having 200 notifications.
# Histogram of number of wikis that users have unread notifications on
SELECT numwikis, COUNT(*) AS numusers FROM (SELECT euw_user, COUNT(*) AS numwikis FROM echo_unread_wikis WHERE euw_alerts>0 OR euw_messages > 0 GROUP BY euw_user) AS t GROUP BY numwikis;
+----------+----------+
| numwikis | numusers |
@catrope
catrope / gist:0302a3c346571d4edd01
Created January 22, 2016 20:36
Cross-wiki notifs data, round 2
# Histogram of number of wikis that users have unread notifications on
mysql:research@x1-analytics-slave [wikishared]> SELECT numwikis, COUNT(*) AS numusers FROM (SELECT euw_user, COUNT(*) AS numwikis FROM echo_unread_wikis GROUP BY euw_user) AS t GROUP BY numwikis;
+----------+----------+
| numwikis | numusers |
+----------+----------+
| 1 | 31115 |
| 2 | 1832 |
| 3 | 1094 |
| 4 | 496 |
| 5 | 48 |
@catrope
catrope / gist:80ffb8f02d1ce7deb303
Created January 22, 2016 00:39
Cross-wiki notifs data
# Queries run around 4:30pm PST on 2016-01-21
# Histogram of how many wikis users have unread notifications on
# (21k users have unread notifs on 1 wiki, 1174 on 2 wikis, 949 on 3 wikis, etc)
mysql:research@x1-analytics-slave [wikishared]> SELECT numwikis, COUNT(*) AS numusers FROM (SELECT euw_user, COUNT(*) AS numwikis FROM echo_unread_wikis GROUP BY euw_user) AS t GROUP BY numwikis;
+----------+----------+
| numwikis | numusers |
+----------+----------+
| 1 | 21177 |
| 2 | 1174 |
Echo (wmf22)
b410f76 Document Event methods that can return null
5d772ad Expose the revid of the event revision in the API
86da832 Require a Language object in DiscussionParser::getTextSnippet()
1ac72cc Split alerts and messages in Echo
35c4a37 Use db-replicated objectcache for storing last seen time
f6a12f1 Correct 'primaryLink' to 'primaryUrl' everywhere
e650df6 Separate 'seen time' for alerts and messages
59efdc5 build: Bump grunt-contrib-jshint from 0.11.2 to 0.11.3 to fix upstream issue
@catrope
catrope / gist:8e5a193f6df8617847eb
Created September 14, 2015 17:04
wmf22..(wmf23)
Echo
2ec0cca The return of the 'mark all as read' button
7310a6b Show unread notifications first in the popup
73e3ed3 Add a tooltip to the notification badges
aae891d Use #pt-notifications-alert to get Special:Notifications link
b6712be Reduce distance between notification badges
71999b2 Only show 'mark all as read' AFTER there are notifications
a3e5dd4 Add mediawiki.jqueryMsg dependency
a37e764 Align popup footer buttons to take 50% width each
Flow
48784a9 Eliminate two API requests for board description fixed-html on load
98d4e25 Reduce font size and vertical padding of topic header
d04ba54 Fix positioning of resolved check icon in RTL
15b5758 Use the VirtualRESTService to configure Flow
041b733 Add namespace for Arabic
2af44bb Edit post widget
b06fa4a Browser tests: fix typo in step usage
8dda456 Use addJsConfigVars() instead of makeInlineScript() for JSON blob