Anaconda/Work List

From FedoraProject

< Anaconda
Revision as of 16:05, 30 September 2011 by Dlehman (Talk | contribs)

Jump to: navigation, search


Anaconda UI Work List

Bored? Tired of bugs? Looking for something new to do? Why not check out something from this list of work items for the new user interface! The list below is what can currently be worked on, given the state of the base classes and custom widgets. If you want to claim one of these items, simply put your name in the right column. Discuss your code on anaconda-devel-list and when you are happy with it, link to it here (eventually, you will instead commit to anaconda but we're not there yet). If you have any questions, ask clumens.

More items will be posted periodically, so be sure to check back.


First, here are a couple guidelines for all items.

  • You will need a lot of very current software installed to work on this. At the least, you'll want gtk3, gobject-introspection, glade3 and glade3-libgladeui, pygobject3, and all their devel subpackages. You'll also want to make sure you have the latest glib. It might be best to be running rawhide or at least F16 with this stuff updated. RHEL6 probably isn't going to cut it.
  • Use glade for as much as possible. glade allows doing all the TreeView and ListStore stuff now. Use glade for dialogs. Use signals where appropriate.
  • Consider keyboard use - put mnemonics on things.
  • Don't hard code stylistic elements (absolute font sizes or names, rounded corners, and the like). We want to use the shipping GTK style to decide all that for us. Of course, you can specify things to be bold or red as needed.
  • Include test cases.
  • Do not look at existing anaconda UI code for how to do things. I'm planning on getting rid of it all anyway, and I don't want people dragging bad ideas from the past along.
  • Don't worry too much about integrating your code with anaconda as it stands today. Make your solution something that can be tested standalone and pulled into non-anaconda applications. We'll worry about the integration later.

Brief pygobject Introduction

pygtk is dead. Nothing in the new anaconda UI will be using it. In its place, we have pygobject3+gobject-introspection. This is an automatic binding generation system that examines source code and generates libraries that can be used in other languages. It's not specific to Python, but that doesn't really matter for our purposes. It's also not specific to GTK. gobject-introspection can be used with just about anything.

If you need to use the new GTK bindings from within python, it's really pretty easy:

>>> from gi.repository import Gtk

One interesting note here is that anything gobject-introspection has a binding for is in /usr/lib64/girepository-1.0. Then once you've got Gtk imported, everything else looks rather familiar:

>>> w = Gtk.Window()
>>> box = Gtk.HBox()
>>> lbl = Gtk.Label("This is a label")
>>> box.add(lbl)
>>> w.add(box)
>>> w.show_all()
>>> Gtk.main()

Constants are hiding a little bit. If you want to specify whether something's oriented vertically or horizontally, you have to use Gtk.Orientation.HORIZONTAL. With a little bit of practice (and a lot of use of tab completion in ipython) you'll eventually get comfortable with how things are laid out. Since it's all automatically generated, it's at least consistently weird.

Using your glade-generated interface file is not really all that different than it used to be, either:

from gi.repository import Gtk
builder = Gtk.Builder()
w = builder.get_object("window1")

The key difference is that it's now get_object.

Work List

Title Date Posted Owner Source Link Screen Description
Language selection widget Sep 29 mgracik #1 The ListView in the center of the screen containing supported language names in their native language and in English, along with type-ahead support. Your solution should be the type-ahead filter box and scrolled list of languages. This will end up getting packed into something else in glade later, but figuring out how to get the list of languages is a good first step. The ideal solution will not involve any of the lang-names and lang-table crud we have now.
Disk utilization pie chart Sep 29 #9-1-1 A little pie chart that appears next to a DiskOverview showing how much of the disk is free. The black part indicates used space, and the white part indicates free space. Your solution should be a class or method that takes in a total size and an in-use size and returns the pie chart. The size of the chart itself should not be fixed - that is, it should be able to scale larger and smaller as necessary.
Disk shopping cart Sep 29 akozumpl #9-1-4 A light box dialog displaying a list of every disk selected for installation. The biggest part here is a ListStore with columns that can be resized and headers that can sort the contents of their column. Your solution should be a class that takes in a list of selected disks and returns a list of selected disks, since there's a Remove button. A selected disk should be an object out of the DeviceTree, so you can count on having a usable storage module. Do not count on having anything else from anaconda. (note from mizmo: the version of this screen for specialized / network disks may have a treelist with category headers (categories like multipath / hw raid / zSeries / etc.) )
Installation options dialog Sep 29 mgracik #9-1-5 A simple light box dialog that pops up after Continue is clicked on the Install Destination spoke. Your solution should be a class that returns information about which button was clicked, along with whether to do custom partitioning.
Create new partition dialog Sep 29 dlehman #9-3-1 A light box dialog that allows the user to specify a new partition. Your solution should be a class that returns what the user specified. I have not thought too much about this one, but perhaps it is best to return a set of Requests. I don't much like the idea of the class itself modifying the Storage object. The class should take in a maximum and minimum size for the new partitions in order to come up with boundaries for capacity, and should be able to filter out existing mount points from the drop down.