irc link handling

Back in 1996 the World Wide Web Consortium made a draft specification for how you can link to an IRC chatroom. The draft does not seem to have developed further, but it is regardless possible to stumble upon these links around the internet now and then. Many other IRC clients support the handling the links too and this week I have enabled Polari to open them.

The links typically take on the following shape:
irc://[server]/[room]

If I wanted to link to the #polari chatroom, the link could look like so:
irc://irc.gnome.org/polari

Polari can open these links regardless of whether it is running or not. Furthermore, if you open a link to a server you haven’t used before, then Polari will ask you to specify a username to use for that connection.

07-05-15 new-connection-thumb

The bug in question is bug Bug 728593. I am keeping a solution to solving it inside the wip/bastianilso/irc-url-parsing branch. However, there’s a few things I am considering before calling the work in this area done:

  • It would be a good idea to show a notification if Polari is unable to parse the irc link.
  • It might be worth to also support corner cases of the irc link specification such URLs targeting nicknames, URLs containing a passphrase and so on.
  • It could be cool to have a “Copy link adress” menu item per room so you can copy/paste a room’s irc link to other people. The menu item could be placed in the room menu and/or in the right-click menu for each channel.
  • It could be cool if we parsed mentions of rooms (fx #polari) in chats as IRC links you could click or copy/paste.

I’ll be off for a small trip the next four days but will return in the weekend for more polari bug fixing. (:

smarter status hiding

In heavily populated IRC channels such as #debian on Freenode, a lot of idle IRC users are joining and leaving every couple of seconds. At the moment, we display a status message for every user in the room which in some cases results in a lot of visual noise.
06-30-15 visual-noise-thumbanother busy day on #debian. 9 out of 17 messages in the chat view are status messages..

This problem is filed as bug 711542 in GNOME’s bug tracker. I have decided to try addressing this issue with some logic.

The main purpose of status messages is to indicate activity concerning a user, such as the user joining a channel, disconnecting or being renamed. The two primary use cases I see for displaying status messages in the chat view are:

  • ..when a user on a channel is actively participating in a conversation, but then the user’s status suddenly changes. For anyone reading the conversation, it is interesting to know what has happened with the participating users as a change in their status can affect the conversation itself.
  • ..when a channel is idle and no conversation is happening. In this case it is a convenience to display status messages. You might be waiting for someone particular to join the channel for example and thus is checking the channel occasionally to see if the person has joined the room. On the other hand, we also want to avoid flooding the chatView with status messages as it creates more unnecessary extra text to scroll through between conversations in log history.

To adress point one, I have implemented the concept of “active” users and “inactive” users. An active user is any user on the channel who has sent a message to the room within the last X* minutes. If the user is considered active, we allow any status messages related to this user to be displayed in the room.

06-30-15 only-active-users-thumb Only recently active users emit status messages.

So because user Raazeer wrote “jelly, if I’m not back in ten minutes, I’ve destroyed my boot config and won’t be back today”, Polari will allow Raazeer’s status messages to be displayed the next X minutes. As can be seen in the screenshot above, a status message indicated that Raazeer disconnected shortly afterwards.

To address point 2, Polari will display status messages for any users provided there hasn’t been any conversation in the channel within the last X minutes. However, if more than 4 status messages are emitted while the channel is idling, Polari collapses the status messages and displays a single line summary instead. The summary can be expanded to reveal the details at any time.

06-30-15 compressed-status-message-thumb Screenshot of a status summary in action. Clicking the “…” can be clicked to reveal the status messages.

With these changes I hope we’ll have less visual noise from status messages in Polari. Feel free to have try my current branch. With problems like these, I think the best way to find out if it’s solved, is by trying it over a longer period of time.

*duration to be discussed. It’s currently set to 5 minutes, which is unfortunate for Raazeer since he said he would return in 10 minutes. Maybe a good indication that I should use a higher number? d:

more menus

Since last blog post I have been designing and implementing a room menu for Polari.
06-25-15 polari-room-menu-thumb
Screenshot of current implementation of the room menu in Polari.

The goal of this menu is to provide actions for the current room you are viewing. The menu will help solve some problems:

  • Makes it possible to read the room topic in full and change it if you have the permissions to do so.
  • Creates a more obvious way to leave a room which is also touch friendly.

These points have been implemented and are available in the branch wip/bastianilso/room-options. I am still considering what other actions are necessary to have in the room menu. My plan is also to expose whether the room is on a private/public network and relevant channel permissions as well as your own status. For private conversations, the room menu could also be an ideal place to expose extra information about the recipent you are talking to if available.

Feel free to share any other use cases you think is the room menu could cover.

a digest from polariland

Aside from larger items on my list like the previously covered Initial Setup experience, I am also working on a lot of smaller items in Polari. After finishing the GNOME 3.16 release video, I have been submitting small patches to Polari with great assistance from Florian.

06-14-15 polari-pile

First, I recently submitted a patch to Bug 724592, which adds support for the /msg command. A lot of IRC guides mention using the command “/msg NickServ identify username password” but at the moment writing this in Polari will just result in a “command unknown” response. Any results matching your search term is now also highlighted accordingly in the user list (bug 745743). Furthermore, when opening the user list, the search entry always receives focus so you can just type ahead (bug 750689). Users who are offline are now indicated in the chat history by color (bug 710792). Finally, the “join room” dialog now validates the user’s input against the server’s room list and provides auto completion (bug 709846).

Some of the patches still lie around in bugzilla. Others you can enjoy from Polari’s master branch already. I look forward to work through more small details like these. Being able to shape a user experience like that is simply great.

A first time Polari experience

The flags have been raised, summer has kicked in and GSoC is happening. I’m here to share with you what I have on the harddisk at the moment. I am working here and there on Polari, an IRC chat application.

Some days ago I picked up the task of revamping Polari’s first-time-usage state. In Polari 3.16 a new user is presented with an empty window first time he opens Polari such as the figure below. The reason is that no rooms have been joined and no connections have been setup.
before-gsoc-thumb
Polari’s current way of saying “please add a connection and join a room to chat”.

It might not immediately be obvious how to get started chatting with this thing, however. I took some inspiration from Calendar’s recent initial setup designs by Allan Day and whipped it up with an old prototype by Carlos Soriano. Here’s a video of the work so far.

initial-setup-thumb
Screenshots of the implementation in my initialSetup branch.

First time you open Polari, you will now be presented with a welcome dialog which will help you connect to one or more IRC servers. Furthermore, the empty main Window has been made more welcoming to newcomers. The Polari logo and title is there to communicate that this weird looking window in fact is the Polari app. Below a small hint presents the almighty ‘+’ menu, so the user can start adding some rooms.

Existing Polari users won’t see any of this of course. Once you have joined your first rooms, Polari will automatically join them next time you open it.

A pretty but ugly app wiki template

I recently adapted Builder’s wikipage layout for Polari. I think it adds some fresh air to the app and gives it a home to build upon. Nautilus and Calendar has adopted the layout as well. So I thought I might post how to adopt it.

Before we continue however, I have a warning: at the moment this template contains ugly markup based on tables. Use at your own risk only if presentation means anything for you beyond the ordinary. And feel free to help improve on it!

A GNOME Apps landing page wiki template

05-26-15 template

There’s two links you need be concerned about:
* Template as wiki markup.
* Template as Inkscape SVG file

To give your wiki page a makeover, copy the wiki markup from link 1. The wiki markup consists of four pictures and some text. To change the text, I would suggest you use find and replace, so you avoid messing up the markup. For images, I suggest you take screenshots and use something like GIMP to crop and export the images as PNG. The four images in the markup code are named “appname-splash.png”, “highlight1-figure.png”, “highlight2-figure.png”, “highlight3-figure.png”. I suggest you rename them (remember to do that in the markup too) to something appropriate for your App.

The Inkscape SVG file which I have provided above can be used to produce the splash image in the top of the template. While you are on the blank layer, copy and paste a high resolution icon of your app into the template. Then select the outer black rectangle, hide the layer called “place-holder-content” and e
To export a splash screen, turn off the visibility for the “place-holder-content” layer and the “bg” layer. Then while, you still have this selection, press Ctrl+Shift+E and export a PNG of your selection at around 750x275px. For this to work properly, “Hide all except selected” should NOT be checked.

If you are not too familiar with Inkscape, I would suggest you download the splash image from Polari (right-click -> Save image as..) and use this png as reference to create your own in fx GIMP.

Let me say this a second time: At the moment the layout is made up of ugly tables (in 2015!). It’s not mobile-friendly, possibly not screen-reader friendly and I think it might require someone to look at theme and workings of our GNOME Wiki itself. With these things fixed though, I think the layout would be cool for all app wiki pages to adopt in some far-away future. The efforts I did on this is only to try to push this a bit forward. I will gladly assist anyone making that future happen.

Google Summer of Code Adventures

polari-generalThis summer, I’m about to start a great learning experience. I’ll be busy as a bee working on GNOME’s IRC client, Polari. My aim is to improve the chatting experience of this app, for the benefit of GNOME contributors and users alike. There’s currently 87 bugs filed against Polari. I’ll focus on the following four areas and possibly more:

  • Keyword notifications
  • Error-handling
  • Paste service support
  • Initial setup experience

My intention is also to file bugs against developer documentation along the way.

Currently, I’m working on bugs here and there to get some insight into Polari’s infrastructure and some experience working with Telepathy, Gjs and GTK+. I think finding a good workflow for approaching new problems (bugs) is the most important. Many coffees to Florian for being my mentor and a great help so far. (:

EDIT: More information here.

Another release, another release video

GNOME 3.16 has been out for a week by now and so has the GNOME 3.16 release video. It’s always a great feeling to publish a production after having it in work for a long time. Spread over 3 months I have spent approximately 30 evenings in total on this thing and I will gladly do that again! I learn a lot from making them.
01-04-15 time-spent

During this period the engagement mailing list has given me valuable feedback on everything from manuscript to animation. Karen Sandler and Mike Tarantino has also been a great help, providing amazing voice-over for this release video. High-five!

You might find a few new things in this release video compared to past release videos:

  • I have focused more on making the content shine and only utilize on animations when they can compliment the content. A big thanks goes to GNOME for letting me borrow a HI-DPI screen to make this possible.
  • I was out early with the first draft of the release video, which meant there was some time before release available for the translation team to create translated subtitles for the video.
  • 01-04-15 subtitles

  • Another nice touch is that I had time to make a custom thumbnail for this release, so the video appear nicely on social media.
  • 01-04-15 thumbnail

There’s been some nice hype around the release. I’ll share a few opinions with you:

Most polished and nicest looking desktop on Linux. Period.
-tjpld

GNOME 3.16, I wanna kiss you.
-Lucas Zanella

Would like to congratulate the +GNOME folks and everything else who has contributed to the project for this fantastic 3.16 release. It has become a tradition for every new Gnome release to be a lot better than the previous one and 3.16 continues it.
-Ozon

Oh, and there was some cool guys on youtube who featured the GNOME 3.16 release video in their show.

Huge credits goes to the GNOME Design Team for awesome assets, Anitek for the awesome music, engagement team for the awesome feedback and translation team for the awesome subtitles. Also thanks to everyone who helped me by fixing visual bugs early so I could record the new improvements. GNOME 3.18 will be amazing.

A guide to git in GNOME for the simple minded

I’m not too fond of terminals. This guide is for new GNOME contributors like me whose brain capacity for terminal commands is only so-so big. I will introduce you to 8 git commands worth remembering. I assume only vague familiarity with git: pulling, pushing and committing.

In GNOME you need to

  • keep your commits clean.
  • let your commits go through GNOME’s bugzilla as a patch.
  • make modifications to your commits based on feedback.

To do this, first, start doing your work in local branches. A branch is like doing a Save-As of your current git project including history and everything. The branch is independent and you can freely jump back and forth between “master” and your own branch.

Create a branch:
git branch yourname/yourbranch

Open a branch:
git checkout yourname/yourbranch

Delete a branch:
git branch -D yourname/yourbranch

Okay. Now, you have done your work and you need to file a bug on bugzilla. Commit your work with a max 80 character commit message and then make a *.patch you can upload.

git format-patch HEAD^
(creates a patch from your latest commit.)

Soon you receive an e-mail saying someone reviewed your patch, and they tell you to make some changes. So you make the changes and now you want to put them into your existing commit. You do this by first doing git add , and then do:

git commit --amend
(modifies your commit to include your changes.)

You can then create a patch from your commit again and upload your new work to bugzilla. Remember to mark the old patch as obsolete in there.

Let’s say you need to test someone else’s patch then. To do this you can do a:

git am mypatch.patch
(applies a patch to the top of your branch.)

This will apply a patch named mypatch.patch to your git folder. If you want to revert back to how it was before, then you can do:

git reset --hard HEAD^
(reverts the top commit of your branch.)

This will revert the latest commit so be careful. Work on a copy branch so you safely can mess around. There’s no easy ctrl+z here. You can run this reset command several times to go several commits back in time. You can keep track of where you are with:

git log
(shows the 5 latest commits on your branch.)

..and that’s it. I think this is everything you need to know to start contributing small patches to your favorite FOSS project. You can revert, copy, create and modify patches. Never be afraid of filing bugs, especially when you attach a patch to them. :)

Docs / Developer Experience Hackfest 2015: Tuesday

Me and my computer have been attending the Docs/DevX hackfest happening in Cambridge, England between Sunday the 25th january and Thursday the 29th january.

2015-01-29 DevXHackfest

As you might see in the picture above, we are all seated in a cozy conference room at the Collabora office. I’m sitting with a whole bunch of people from the #docs team being a busy bee.

Tuesday whereabouts

  • Shobha (curiousDTU) has been doing some review of the documentation for GNOME’s games.
  • Ekaterina (kittykat) and Shaun (shaunm) have been discussing how new contributors could be attracted to the documentation team. Furthermore they have also discussed Mallard and how the future could look for it.
  • Ekaterina has also been fixing application documentation bugs here and there in the vast collection of GNOME’s.
  • Peter (pmkovar) successfully converted the translated release video subtitles from *.po and back to *.srt. This means that the GNOME 3.14 release video is now available in 14 different languages! A big thanks goes to the translation team for translating them.
  • Jana (jsvarova) got a public GNOME blog and carried on fixing bugs from the cue that were in scope for this hackfest.

I myself have been focusing on rewriting the Getting started with GTK+ tutorial and learning how to make applications with GTK 3 along the way. My patch is currently undergoing review. Furthermore the GNOME Platform demos has gotten an overhaul – which also is something that currently is going under review. Once the patches land, new developers should hopefully have a better experience which is more up-to-date with how we currently recommend making applications with GTK 3.

Hackfest overall

I am writing this blogpost while I’m on my way back to Denmark. The hackfest has been a great experience in many ways. First, it is great to meet with fellow GNOME contributors face-to-face. This hackfest has also been a big learning experience for me in terms of Git, Mallard, GTK3 and C. I have gained knowledge much more rapidly because I have had great people right next to me, ready to answer any questions of mine (+whisky) and review my (initially poorly written) patches. Thanks everyone!

Once I get home I will probably have a few more patches to submit. Afterwards, it is time to work on planning the GNOME 3.16 release video again. I would definitely love to work further with the developer experience again in the future. And I would definitely attend another GNOME hackfest.

css.php