Wiki script embedding tests: Mandelbrot generator

I’ve been doing some experiments with finding ways to bring more interactive features into Wikipedia and other wikis. Articles can be spruced up nicely in many ways — interactive maps that let you zoom or change time, graphs that allow you to change the parameters, diagrams showing moving parts…

So an extension to sandbox and run custom JavaScript widgets should be a useful direction to go in… my first test is a Mandelbrot set generator:

The extension separates the JavaScript contexts by using an iframe and a small sandbox page hosted on a separate domain, leaving the details of security to the browser’s existing same-origin systems. This gives nearly full power to the script — you could even use 3d WebGL rendering in supported browsers! — without giving it any direct access to users’ sessions on the wiki.

Will try to set up a publicly-usable sandbox page on Wikimedia Labs next week and play with it some more; maybe a gadget to do live-wiki testing with an opt-in. :)

 

Galaxy Nexus first weekend impressions

My Galaxy Nexus arrived in the mail on Friday; I’ve been fiddling with it intermittently since. (You’ll go blind!)

Some first & second impressions:

  • It’s huge. It feels like being a little kid trying to use some giant remote control… it’s just big enough to feel awkward in my hand, and to make one-handed usage difficult with some thumb stretching. We’ll see if I get used to it…
  • The screen feels slightly smaller than it “really” is thanks to the use of the bottom edge for software buttons replacing the classic Android hardware buttons — so it’s not *as* big as you’d think from ‘4.65″ screen’. But that space is now reclaimable, and it turns out to be useful when watching full-screen video.
  • The extra high-density screen is beautiful! At regular viewing distance, text is almost as sharp as on my iPod Touch’s Retina display. The hex tile layout of the OLED pixels is much less visible than on my older Nexus One.
  • Having decent internal storage and ditching the awful SD card has made storage management much easier — my Nexus One was constantly whinging that it was out of internal storage space despite having gigs free on the SD card.
  • Interactive performance is MUCH snappier than previous devices I’ve used, and comes closer to what iOS usually manages.
  • Sometimes the Google folks are going overboard on icons; it took me a while to figure out what the hell all the buttons in their Gmail app did since they switched them all from nice obvious buttons like “Archive” to mysterious icons.
  • Our Wikipedia Android app is totally broken on Android 4; we knew that on the emulator, but it’s muuuuch easier to test it on the real device. Some things are being fixed upstream in PhoneGap, others we’ll still have to work out…
  • Transferring devices on Android isn’t quite as easy as iOS. With iOS, I can restore a complete backup of all my application data and preferences from one devices to another via iTunes: my new iPod Touch was restored from my old iPhone 3Gs which I can’t even find anymore (it’s in the apartment *somewhere*) and updated pretty smoothly. The Galaxy Nexus was able to restore some settings and applications from the ‘backup to Google’, but not everything. Many apps needed to be manually reinstalled and/or reconfigured for accounts; games have lost high scores and achievements etc. Arranging my apps on my home screen again was a painstaking task, and very annoying.
  • I remember it being a big deal that you can get to the Camera app directly from the lock screen in Android 4 — but apparently this only goes for if you don’t have a …. lock … on the lock screen. Add pattern lock, and that feature’s gone. Camera is not in fact locked down so that you can activate it and take photos without going through your unlock code. D’oh!
  • I CAN TAKE SCREENSHOTS! FINALLY! THIS IS GOOD!!!!!!! Press power and volume-down and hold for a moment; it’ll do a cute visual transition showing your screenshot and give you a notification that lets you call it back up to view or share it.
  • Did I mention it’s really huge? It feels like it’ll fall out of my pocket at any moment. :P
  • Haven’t had much chance to test 3G/4G reception yet, though the rumor is Verizon will do better in the subway than AT&T. We’ll see on Monday!

What I kinda want is the same phone, but with a 4″ diagonal screen at 1024×640. Make it fit the hand better, rather than going for that hugeness. I don’t watch a lot of movies on my phones, but I do hold it in one hand and read/write news & messages every day.

Wheeeee

We launched an early developer demo of the editing surface for our upcoming Visual Editor project yesterday — lots of great feedback! I filed some bugs myself testing it on mobile devices, which haven’t got a lot of testing yet. :)

Today:

 

Top Ten Good Things About Taking Off Your Glasses

  1. helps avoid visual distractions: you can’t worry about what you can’t see
  2. make your games run faster by cranking the resolution down
  3. gives excuse to play with browser’s zoom feature
  4. final step of all ’80s movie makeovers
  5. get to bellyache about them whippersnappers with their tiny displays that are so hard to read
  6. dovetails with nostalgia for ’80s PC and video game graphics
  7. blurry icons in your mobile app no longer concern you
  8. looks sweet if you do it all dramatic
  9. avoid that annoying line where the edge of your glasses cuts off the bottom inch of your monitor in one eye when you’re parked on the couch with your laptop
  10. leave secret identity behind to become Superman

Image page mockup for mobile

I went ahead and did a quick mockup for some modified JavaScript and CSS for image pages on our mobile interface. Here’s a live demo:

http://toolserver.org/~brion/mockups/mobile-imagepage/


This is using the current existing File: page markup and modifying it with CSS and JavaScript:

  • the extra data sections are hidden by default except for the image, so they don’t get in the way
  • link bar at top is reformatted and links are used to show/hide each section instead of jumping around
  • the image itself is sized down to fit the screen, but using the same medium-resolution version that we started with

I also changed the viewport settings to allow zooming in, which we’ve been thinking about doing anyway.

Result is:

  • by default there’s less clutter on screen
  •  by default the image fits
  • auto-scales to fit when changing orientation
  • on high-resolution screens (iOS with Retina display, Android with 240dpi or 320dpi display) the picture appears much sharper
  • can zoom in for more detail with standard pinch-to-zoom

Confirmed that it works in at least iOS 5 Safari and Android 2.3.6 Browser, haven’t tested all other things.

Checked in with Phil & Patrick — we think this is a good direction to start with and should be easy to include in MobileFrontend extension (it’s a conservative change that doesn’t alter any HTML of the page itself, and just adds some CSS/JS that will be easy to keep and port in future).

Any comments, ideas? For instance the initial view could be made more ‘image viewer’-y by centering things, removing some extra links or reformatting them, etc

Fixing portal styles for mobile

Wednesday!
  • took cats to vet…
  • misc bug notes
  • a little more banging at Firefox/Android
  • started on some classes in Common.css for the two-column layouts, designed to devolve automatically to single-column on narrow windows and mobile. Added to [[Portal:Literature]] and its ‘related’ portals with good results, but incomplete.
  • Biggest remaining issue in those portals is hardcoded tables of links / icons to other related portals. Starting to replace that with a more modern structure that’ll be easier to modify, and also fits both large and small screens. (Similar to <gallery> which used to be a fixed table and now fills your available area.)
  • another misc bug pass…
  • Heading off to Firefox/Android meetup @ Mozilla SF in a bit

vs before:

I’m in ur code, reviewin’ ur ajax

CR day!
  • various review
  • checked out johnduhart’s neat $wgDebugToolbar thingy — needs some tweaks but looks awesome
  • Reverted some tweaking of pagers which has caused some forms to break as parameter names are changed
  • more review
  • more bugs
  • poked at some search interface issues for mobile w/ patrick
  • test cases for a bug about edit section extraction
  • more stuff
  • walked petrb through initial ajaxification of OnlineStatusBar extension :D
  • got a great list of small-medium projects from Erik to look through

Math goodies and other work

Queued up work from last week:
Done today:
  • sent hopefully helpful links to inquiry about updating an extension to use ajax for state updates
  • sent some comments/updates on potential changes to image metadata storage
  • various mailing list updates
  • trying to get de.planet.wikimedia.org updating bug sorted out — can’t get into RT to file an internal bug, trying to get ops to install the password reset extension for it or something. Mutante is doing some tests on the planet server to see if we can resolve… we think we got it, at least as a workaround.
  • thinking about replacing Planet with own aggregator. :P
  • lunch w/ features & community teams
  • commented on need for user self-deletion on bug report

BugTender updates

Can now post comments on bugs! Auth prompt at post time. No offline queuing yet.

Bug list defaults to showing recently filed bugs. Various search and sort options, incomplete but a start. Doesn’t handle huge return lists well; server gives chronic order oldest first, we want the opposite.

Initial appcache for offline usage. Limited as there’s no persistent data cache yet, but you can load the page when offline.

Restructured bug view to put comments first.

More details in bug list items.

20111205-092116.jpg