[GSoC 2017] Preferences GUI Refactoring Intro

Hello World.

I’m Anirudh Murali (Trac: anirudh; IRC: anirudhm), from the southern region of India. I thank Haiku for selecting me as one of Google Summer of Code 2017 student. I’ll be working on the idea: “Preferences GUI Refactoring” this summer along with my mentors: waddlesplash and Sean Healy.

This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/anirudhm/_gsoc_2017_preferences_gui_refactoring_intro/

I kinda like XFCE approach - you can open individual preference applets separately or as a part of the main “Preferences” window.

1 Like

To be honest, I’m not sure I like all the ideas put forth. I don’t see a reason for a preview (and expect it to be quite difficult to accomplish) and even less for a search within the preferences.
We try to limit the configurations available and the panels that do exist should be obvious wrt what they contain.

It sounds OK to group certain panels for quicker access, like “Input”. But I think you’ll find that you’re either end up with many categories with few panels or few categories that have many panels that only tenuously fit in there.

I’d like to point that by clicking in the Deskbar on “Preferences”, all the panels are already listed in a window. It would be nice to show them also as big icons instead only in a list. But in a list, you have the possibility to use “type-ahead-filtering” to filter keywords. By adding a keywords attribute, we could make it easy to filter out e.g. “Input”, “Audio” or “Hardware”.

I imagined this GSoC task to be rather about how the existing panels could be combined and improved. E.g. Touchpad & Mouse, Keyboard & Keymap & Shortcuts, Screen & Backgrounds, Media & Sounds, Deskbar & Tracker, etc.

This panel condensation shouldn’t go overboard either. Some things are complex enough on their own. Instead it could be tried to make the GUI more consistent, more intuitive or just prettier.

I don’t want to sound too negative, however. :slight_smile:
GSoC is just starting and together with your mentors you can still steer your project in any direction.

1 Like

A question: This is fine for the standard Haiku Preferences. But third-party applications can also have separate Prefs applets.ATM we can place those in the Preferences deskbar folder and they show up there along with all the others. What will happen to them now? Will they all get bundled into a Miscellaneous category?

1 Like

I see a way to implement DioGen’s suggestion, and possibly alleviate humdinger’s and michel’s concerns, but it would involve updating the existing preference apps.

  1. Each preference app would need to have attributes that contained a category indicator, a preview pane (probably as an archived and flattened BView) and a set of keywords, and any other information the combined panel might need. Any preference app that did not have the proper attributes would use default values.

  2. The combined panel iterates over the preference apps and pulls the information from the attributes. (And the icon via BAppFileInfo.)

  3. The combined panel presents the information more or less as pictured above.

  4. If the preview pane needs to be interactive (i.e., to be able to actually set some common features), this would probably have to be implemented via a BView subclass in the preference app, and the app would need to be loaded via load_add_on(). (But I think archive instantiation will in fact autoload the addon, if the proper data is present in the archive.) I believe Haiku will allow you to load an executable as an add-on.

This allows both the individual app and combined panel approaches to be used, depending on an individual user’s personal preference, and allows 3rd-party apps to also be supported in the combined panel.

This would be rather a large undertaking, though, and if Anirudh uses this approach, I would suggest starting with a small group of preference apps to provide attributes for. (The input preference apps have already been suggested as an initial target for this project.) Other preference apps could be updated with the necessary attributes after GSOC.

The reason the initial project was about input preferences is two-fold:

  1. It is likely already enough work to get a good design for just that part working (merging keymaps, keyboard, touchpad, mouse preferences, possibly adding tablet/touchscreen and joysticks)
  2. Doing it right involves more than creating a window that merely allows to reach existing panels. In the case of input preferences, I’d expect the main window to list all my input devices, for example a typical situation for me would be:
  • 1 touchpad or trackpoint in my laptop
  • 1 external trackball or mouse (possibly with more than 3 buttons)
  • 1 internal keyboard
  • 1 external keyboard

I should be able to set different preferences for each. For example, my laptops have a French AZERTY keyboard, but I also use an external keyboard when I’m at home, and this one is spanish QWERTY. For the mouse/trackball vs trackpoint/touchpad, I would much appreciate being able to set different acceleration settings for each of them.

If you start thinking about this, I think you will probably end up with something similar to the Media preferences or Network preferences: a list of devices, which allows you to reach specific settings for each. And you can see the same applies to Printer preferences, for example.

So the next idea is: how can we avoid having these list of devices in each preference panel? Can we instead design a central place where you see a list of all devices and can easily reach the appropriate preference window for each of them? I think that is what the preferences application should be.

1 Like

Haiku users are a conservative bunch. We still have an option in Tracker to show a single “Disks” icon on the desktop instead of separate volumes, something that wasn’t default in BeOS since … I don’t know, DR9? I would hope we see the same option presented wrt the Preferences.

jalopeura’s suggestions look doable - it would have to be documented in th Haiku documentation, so add that to your to-do list.

1 Like

I’m inclined to agree with humdinger: If you give an attribute for the category of each item, you can sort them by category in tracker anyway. And if you add an attribute with keywords, you can search them using the normal search interface of haiku.

If you need somewhere to aggregate devices, this doesn’t seem to be something that applies to every preference preflet, only those that could potentially have multiple entries (i.e. hardware devices). You wont need e.g. multiple Virtual memory, sounds, time, screensaver etc entries. So why not simply make a hardware or devices panel that lists those hardware devices for which you might have multiple entries? TBH, even that seems clunky. Why not just have a tab for each device in each preflet?

Reimplementing things that can be done using attributes and file system search doesn’t really seem to fit with the haiku philosophy of doing things once and getting them right.

Personally, I’d rather see work on tracker and deskbar, which could really use some love.

Having said all that, best of luck with the project anirudhm, I hope that you come up with something that everyone can agree with and appreciate.

1 Like

[quote=“humdinger, post:3, topic:5627”]
I don’t see a reason for a preview (and expect it to be quite difficult to accomplish) and even less for a search within the preferences.[/quote]
Yes I see these as lower priority than other needs for improving the Preferences.

And I think this can be done AND have something like what Anirudh describes. If you combine several preflets into one, you can still have a “shortcut” that opens the combined preflet to the correct view. Whether you use tabs or a list to have subsections for mouse/keyboard/touchpad/etc each “shortcut” in the Tracker’s preflet list could open with that subsection active.

Yes, there are some really ugly preflets like Shortcuts (which still has an Apply button). These should also get priority for cleaning up even if they aren’t combined with others.

So you’re suggesting device specific settings that get remembered if you unplug a device, then plug it back in later? What about being able to create different “profiles” which you could create for individual devices or even all input devices? So for example if you have multiple family members using a PC you can easily switch profiles for left or right handed users, or profiles for different keyboards.

1 Like

I’m wondering if it would make more sense to make a “generic” selector which could plug into Tracker, so that this “type to find” code could be used across Haiku, and not just for settings.

Do you have some suggestions of things to add to our GSoC ideas list? It is too late for 2017 but we can prepare the 2018 edition already.

May I suggest that instead of having to maintain by hand explicit meta keywords, the search feature could be fed from or even run directly in the locale-aware strings in each Preferences app executable files?

Users who will try to search a setting by its name will do it in his own language, not in some forced meta keywords one.

The localisation build step is a good position to find every words describing some setting in a preference window in the user locale. I guess it can also be doable at runtime by looking inside locale section of each executables, maybe updating some index on a lazy model, aka each time the preferences app exe file is newer than last known indexed, if performance is an issue.

Another way to look at it is that Applications could be indexed like any kind of “document” files, and this feature could be used to help user to find quickly which app allow to set some setting by filter to keep out only document of type “app” that are stored under a Preferences folder (or have some attribute saying it’s a preference app", whatever).

If this search feature could in fact leverage index_server power, it would be better and more orthogonal solution…

[quote=“Perelandra0x309, post:10, topic:5627”]
So you’re suggesting device specific settings that get remembered if you unplug a device, then plug it back in later? What about being able to create different “profiles” which you could create for individual devices or even all input devices? So for example if you have multiple family members using a PC you can easily switch profiles for left or right handed users, or profiles for different keyboards.[/quote]

Having the settings being remembered for specific devices would be very nice. I guess they can be distinguished by vendor id?
I wouldn’t go into profiles for different users. That should be handled if Haiku becomes multi-user. Until then people should just create several parallel installations. :slight_smile:

I’ve always been partial to just simply opening the Preferences folder in ‘icon mode’ to get a similar experience. Maybe add some smarts to Tracker to sort Preferences by category in some logical/visual way.

I like the setting center of deepin linux, I think this is the right way to manage all settings.
Screen shot:deepin setting center