After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743854 - Toggles for ready-made searches
Toggles for ready-made searches
Status: RESOLVED OBSOLETE
Product: gnome-boxes
Classification: Applications
Component: search
3.15.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-02 13:46 UTC by Zeeshan Ali
Modified: 2018-01-11 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of a search menu prototype (77.57 KB, image/png)
2015-06-25 10:44 UTC, Adrien Plazas
  Details
app-window: Put collection view in stack (6.94 KB, patch)
2015-06-29 11:13 UTC, Adrien Plazas
none Details | Review
collection-toolbar: Add collection view switcher (2.33 KB, patch)
2015-06-29 11:13 UTC, Adrien Plazas
none Details | Review
collection: Add CollectionFilterFunc delegate (896 bytes, patch)
2015-06-29 11:13 UTC, Adrien Plazas
none Details | Review
collection-view: Add 'item_visible_func' prop (1.42 KB, patch)
2015-06-29 11:13 UTC, Adrien Plazas
none Details | Review

Description Zeeshan Ali 2015-02-02 13:46:24 UTC
Just like in Documents app, it would be nice to provide toggles for ready searches like "Remote boxes", "Virtual boxes", "Local boxes" etc:

https://bugzilla.gnome.org/show_bug.cgi?id=736972#c3
Comment 1 Adrien Plazas 2015-06-25 10:44:06 UTC
Created attachment 306084 [details]
Screenshot of a search menu prototype

Is this the kind of UI we want or did I misunderstand this bug?
Or did you want a set of buttons in the headerbar acting as page switchers?
Comment 2 Zeeshan Ali 2015-06-25 11:13:00 UTC
(In reply to Adrien Plazas from comment #1)
> Created attachment 306084 [details]
> Screenshot of a search menu prototype
> 
> Is this the kind of UI we want or did I misunderstand this bug?
> Or did you want a set of buttons in the headerbar acting as page switchers?

headerbar as page switchers please. :)
Comment 3 Zeeshan Ali 2015-06-25 11:16:24 UTC
(In reply to Zeeshan Ali (Khattak) from comment #2)
> (In reply to Adrien Plazas from comment #1)
> > Created attachment 306084 [details]
> > Screenshot of a search menu prototype
> > 
> > Is this the kind of UI we want or did I misunderstand this bug?
> > Or did you want a set of buttons in the headerbar acting as page switchers?
> 
> headerbar as page switchers please. :)

Actually I think this bug is about the search toggles like in your mockup. I thought we had a bug about switchers but I can't find it so feel free to file a new one for that if you're going to implement that. I think page switchers are more important, though in there we have be extremely selective of which switches we want.
Comment 4 Adrien Plazas 2015-06-25 11:51:12 UTC
Actually it's not a mockup but a screenshot. =p

Ok I'll work on adding page switchers. Do you know how to discriminate local machines from remote ones and physical machines from virtual ones? I always thought LibvirtMachine represented local virtual machines and RemoteMachine represented remote machine (physical or virtual).

A page I _don't_ want to see is a "Favorites" one, it wouldn't make much sens as favorites are already extremely visible when displaying all the available machines.
Comment 5 Zeeshan Ali 2015-06-25 12:18:21 UTC
(In reply to Adrien Plazas from comment #4)
> Actually it's not a mockup but a screenshot. =p
> 
> Ok I'll work on adding page switchers. Do you know how to discriminate local
> machines from remote ones and physical machines from virtual ones? I always
> thought LibvirtMachine represented local virtual machines and RemoteMachine
> represented remote machine (physical or virtual).

That's a start but I think we'll have to be smarter than that since there are remote libvirt machine case. Basically you gotta check the URI (Machine.source.uri).

* For LibvirtMachine, that will be qemu:///session or qemu:///system. Otherwise it's remote.
* For Remote, you'll have to check if IP is local or not.

Alternatively you can just check if IP is local or not for all machine types. I just started working on bug#744004 and my plan is to add an 'ip' property to Machine class so you can rely on that once I'm done.

> A page I _don't_ want to see is a "Favorites" one, it wouldn't make much
> sens as favorites are already extremely visible when displaying all the
> available machines.

Hmm.. yeah considering that we always put them in front of non-favorite ones. It would be a good work around for bug#751478 but not really a fan of working around issue with adding clutter to UI. :)
Comment 6 Adrien Plazas 2015-06-29 11:13:13 UTC
Created attachment 306276 [details] [review]
app-window: Put collection view in stack

Move the window's collection view in a Gtk.Stack.

This is needed to allow to switch between multiple collection views to
offer multiple ready-made searches.
Comment 7 Adrien Plazas 2015-06-29 11:13:18 UTC
Created attachment 306277 [details] [review]
collection-toolbar: Add collection view switcher

Add a Gtk.StackSwitcher as the collection toolbar's custom title widget,
allowing to switch between the window's multiple collection views.

This is needed to allow to switch between multiple collection views to
offer multiple ready-made searches.
Comment 8 Adrien Plazas 2015-06-29 11:13:23 UTC
Created attachment 306278 [details] [review]
collection: Add CollectionFilterFunc delegate

Add the CollectionFilterFunc delegate, allowing to filter a single
collection element.

This will be used in next commits to filter the visible elements of a
collection and is needed to offer multiple ready-made searches.
Comment 9 Adrien Plazas 2015-06-29 11:13:27 UTC
Created attachment 306279 [details] [review]
collection-view: Add 'item_visible_func' prop

Add the 'item_visible_func' delegate allowing to filter visible items of
the collection view.

This is needed to filter the visible elements of a collection and to
offer multiple ready-made searches.
Comment 10 Adrien Plazas 2015-06-29 11:22:13 UTC
These patches don't add searches/pages, but they add everything needed to add them.

Adding new searches is simple:
- add a new CollectionView as a page to AppWindow.views,
- apply the same treatment to it than AppWindow.all_view (by searching where it is used in app-window.vala),
- then just set this new page's "item_visible_func" property, and voilà!
Comment 11 Zeeshan Ali 2015-06-29 12:12:36 UTC
(In reply to Adrien Plazas from comment #10)
> These patches don't add searches/pages, but they add everything needed to
> add them.

Great! I'll review once they add a functionality. :)
Comment 12 Adrien Plazas 2015-06-29 14:10:28 UTC
Now all we need to know is what categories we want.

Basically:
- can we tell if a remote machine is virtual or physical?
- can a local machine be another thing than virtual?

If both are false, there are two groups of boxes we can know about:
- local virtual machines
- remotes machines (virtual or physical)

Meaning that having a tab for virtual machines may not be a good idea, and we would only have the "Local" and "Remote" tabs alongside the "All" tab.
Comment 13 Zeeshan Ali 2015-06-29 14:25:54 UTC
(In reply to Adrien Plazas from comment #12)
> Now all we need to know is what categories we want.
> 
> Basically:
> - can we tell if a remote machine is virtual or physical?

Yes kinda, we have different classes for dealing with different kinds of machines. If it's LibvirtMachine or OvirtMachine instance, its a VM. If it's RemoteMachine, well we shouldn't care in that case.

> - can a local machine be another thing than virtual?

Theoretcially, yes. You can setup a vnc or spice connection to host and use Boxes to access it on the same host but it's not at all a use case.

> If both are false, there are two groups of boxes we can know about:
> - local virtual machines
> - remotes machines (virtual or physical)

Sure. I'd name them:

- Local
- Remote

> Meaning that having a tab for virtual machines may not be a good idea, and
> we would only have the "Local" and "Remote" tabs alongside the "All" tab.

But please keep in mind this is not the appropriate bug for page switchers, as pointed out in comment#3.
Comment 14 Zeeshan Ali 2015-06-30 15:36:02 UTC
*** Bug 751727 has been marked as a duplicate of this bug. ***
Comment 15 GNOME Infrastructure Team 2018-01-11 10:13:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-boxes/issues/41.