User talk:Roan Kattouw (WMF)

Jump to: navigation, search

About this board

Previous discussion was archived at User talk:Roan Kattouw (WMF)/Archive 1 on 2015-07-10.

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Sponsor development of features in Flow?

1
TitusiMW (talkcontribs)

Roan, I really like to have a small set of additional features in the Flow extension.

Is there any way for me to sponsor or support development? Thanks!

Reply to "Sponsor development of features in Flow?"
Nirmos (talkcontribs)

Hi! Is there any JavaScript function I can call to update #pt-notifications-alert and/or #pt-notifications-notice?

Reply to "Function to update notifications"
Nirmos (talkcontribs)

I just have to ask, is there a reason we aren't able to get the user name of IPs? mw.user.getName() returns null for IPs. At first, I thought maybe this is because of some security or privacy concern, but I'm not sure that makes any sense. Does it have to do with caching?

Ideally, mw.user.getName() should return the IP for IPs, and if you want to differentiate between IPs and logged-in users you would use mw.user.isAnon(), and mw.user.isAnon() would have to be reworked to no longer rely on mw.user.getName(). Unfortunately, that would be a breaking change for code that relies on comparing mw.user.getName() with null to tell IPs and logged-in users apart, but maybe that would be acceptable with enough communication (tech news, mailing lists, console.log)?

Roan Kattouw (WMF) (talkcontribs)

The reason is because the mw.config values are in a JSON blob that's embedded in the page, and page views for anons are cached (and therefore are reused between different IPs). This is also why the bar at the top right where your user name appears shows "Not logged in" instead of the IP.

MediaWiki can be configured to show the IP there, but that setting is incompatible with the Varnish cache that WMF uses, so it's only there for 3rd-party wikis.

Nirmos (talkcontribs)

Ahh, so it is because of cache. Okay, thanks for answering.

Nirmos (talkcontribs)

Ok, but what about making a new method called mw.user.getIP and make it async like mw.user.getGroups? Would that be acceptable?

Roan Kattouw (WMF) (talkcontribs)

I believe it would be. Like getGroups all it would need to do is send an API request for meta=userinfo

Nirmos (talkcontribs)

Thanks, I've created phab:T148266 now.

Nirmos (talkcontribs)

Hi. I have some questions about modularization. If I want to get my own name, I can either type mw.config.values.wgUserName or mw.user.getName(), but if I want to get the page name, the only option seems to be mw.config.values.wgPageName. The only thing I can find in mw.page is watch. So, my question is, will more stuff be added to mw.page in the future? Will it be something like mw.page.getPageName() in the future? Is the work with modularization abandoned or ongoing? Will the values in mw.config.values eventually be deprecated once they've been in a module long enough? Is there a Phabricator task about this? I did find phab:T133277 which is called "Modularization of JS code", but that appears to be something much more specific than what I'm talking about.

Roan Kattouw (WMF) (talkcontribs)

Side note: you should use mw.config.get( 'wgFoo' ) instead of mw.config.values.wgFoo.

I don't think there's a specific task about this (perhaps @Timo Tijhof (WMF) would know) but an idea I've proposed before is to expose config variables per module instead of globally. This could change mw.config.get() to something else, but we'd probably keep the old one around for backwards compatibility. As for mw.page, I'm not aware of any immediate plans to move more stuff into there.

I wouldn't say the modularization work is abandoned, but it's not particularly active either. Perhaps a better way to describe its status would be "dormant" or "moving slowly". The task you found is specific to one extension (RevisionSlider).

Nirmos (talkcontribs)

Is there a reason I should use mw.config.get( 'wgFoo' ) over mw.config.values.wgFoo? mw.config.get( 'wgFoo' ) fails silently with trailing spaces, even though it is unambiguous, see this edit for instance. mw.config.values.wgFoo is much more robust and fails loudly.

Roan Kattouw (WMF) (talkcontribs)

The main reason is that mw.config.values.foo is using an internal implementation detail, not the public API. The public API is mw.config.get( 'foo' ). So the latter is considered cleaner, but both work. You're right though that louder failures for misspelled config variables would be good.

Krinkle (talkcontribs)

@Nirmos Ideas for a more complete Page interface exist at phab:T41813. For now, mw.config.get is the supported way to get this information. See also Manual:Interface/JavaScript#mw.config.

(phab:T133277 is actually about the RevisionSlider project, not MediaWiki.)

Reply to "Modularization"
Nirmos (talkcontribs)

Hi. I really want to help develop MediaWiki, but I need some help to get started. I have Windows 10 Home. When I type "vagrant up" in Git Bash, it says

==> default: Verifying Hyper-V is enabled...
The Hyper-V cmdlets for PowerShell are not available! Vagrant
requires these to control Hyper-V. Please enable them in the
"Windows Features" control panel and try again.

Does this mean that I have to upgrade to Windows 10 Pro, or do I need to do something in PowerShell? I'm kind of lost.

Nirmos (talkcontribs)

Pinging @Brion Vibber (WMF) who seems to know a lot about Vagrant/Hyper-V.

Roan Kattouw (WMF) (talkcontribs)

Sorry, I was on vacation when you posted your first comment, so I missed it.

I don't know anything about Vagrant, I don't use it myself. I also haven't used Windows in many years, so I'm afraid I can't be of much help here. I'll also ping @BDavis (WMF) who does a lot of Vagrant work. Even if the solution is simple and not directly Vagrant-related, I'm hoping we can add it to the documentation here on mediawiki.org so people won't have to ask this question in the future.

BDavis (WMF) (talkcontribs)

The last version of Windows I used was NT 4.5, so this fancy new Hyper-V stuff is not anything I've played with. These instructions at MSDN might help @Nirmos out.

Reply to "Vagrant"
MSchottlender-WMF (talkcontribs)

This is a Hebrew RTL test.

Reply to "נסיון עם עברית"
Catrope (talkcontribs)

Testing notificatoin emails

Reply to "Test topic"

Please participate in discussion on updated "Enforcement issues" text

1
MediaWiki message delivery (talkcontribs)

Sorry, the correct link for the discussion about wording re Talk:Code of Conduct/Draft#Enforcement issues is Talk:Code of Conduct/Draft#Circumvention text new wording. Thanks. I apologize for the double-message. User:Mattflaschen-WMF via

Reply to "Please participate in discussion on updated "Enforcement issues" text"

Please participate in discussion on updated "Enforcement issues" text

1
MediaWiki message delivery (talkcontribs)

Thanks for participating in the earlier discussion on Talk:Code of Conduct/Draft#Enforcement issues. There was strong support for the first two points, so they have been closed. Most people either supported the third at least in principle, or were neutral. However, there are some suggested wording changes (partly by Smalyshev (WMF), and partly by me).

Please participate again at Talk:Code of Conduct/Draft#New proposed wording. Thanks. User:Mattflaschen-WMF via

Reply to "Please participate in discussion on updated "Enforcement issues" text"

Please participate in discussion on updated "Marginalized and underrepresented groups" text

1
MediaWiki message delivery (talkcontribs)

Thanks for participating in the earlier discussion on Talk:Code of Conduct/Draft#Marginalized and underrepresented groups. There was some support and some issues were raised. I've attempted to propose a better draft to address the issues.

Please participate at Talk:Code of Conduct/Draft#New proposed wording. Thanks. User:Mattflaschen-WMF via

Reply to "Please participate in discussion on updated "Marginalized and underrepresented groups" text"