[virt-tools-list] [PATCH v3] Redesign OS distro selection UI to be faster to use
Pavel Hrdina
phrdina at redhat.com
Mon Apr 30 14:09:24 UTC 2018
On Mon, Apr 30, 2018 at 11:44:23AM +0100, Daniel P. Berrangé wrote:
> The current OS distro selection UI is fairly cumbersome to use. First
> you need to decide on a variant, then decide a distro and then look for
> the version you want. The list is filtered by default so only a subset
> of OS are displayed. So for less common distros you'll then need to
> start again and tell it to show all OS to try to find the one you want.
>
> The core problem is that we have an incredibly large list and want to
> make it easy for the user to find a specific entry. The modern UI
> paradigm for this problem is to provide interactive search with
> live updated results. The current UI does provide an interactive search
> facility on the OS version results, but you still have to first select a
> variant to be able to use the search which is unhelpful.
>
> This patch attempts to better apply the search UI design to the OS selection
> problem. We get rid of the notion of variants, distros and version, and
> provide a single text entry box in which the user can type a few letters
> of the OS name. As they type, a popover displays the matching results
> filtered on OS name. By default end of life OS will be hidden, so in
> general there will only be a small handful of results left after just
> typing a few characters. This makes it very quick to find and select the
> desired OS, without needing to provide a mutli-step navigation hierarchy.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1464306
>
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
> tests/osdict.py | 26 ----
> ui/create.ui | 205 +++++++-----------------
> ui/oslist.ui | 104 +++++++++++++
> virtManager/create.py | 423 +++++++++-----------------------------------------
> virtManager/oslist.py | 106 +++++++++++++
> virtinst/osdict.py | 88 +++--------
> 6 files changed, 359 insertions(+), 593 deletions(-)
> create mode 100644 ui/oslist.ui
> create mode 100644 virtManager/oslist.py
[...]
> diff --git a/ui/oslist.ui b/ui/oslist.ui
> new file mode 100644
> index 00000000..2424e900
> --- /dev/null
> +++ b/ui/oslist.ui
> @@ -0,0 +1,104 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!-- Generated with glade 3.20.4 -->
> +<interface>
> + <requires lib="gtk+" version="3.14"/>
> + <object class="GtkPopover" id="vmm-oslist">
> + <property name="width_request">400</property>
> + <property name="height_request">300</property>
s/300/280/
The popover is to large to fit into the non-resizable vm-create window.
[...]
> diff --git a/virtManager/create.py b/virtManager/create.py
> index 5afe0afe..5e93869d 100644
> --- a/virtManager/create.py
> +++ b/virtManager/create.py
[...]
> @@ -1221,21 +1009,8 @@ class vmmCreate(vmmGObjectUI):
> elif instmethod == INSTALL_PAGE_VZ_TEMPLATE:
> install = _("Virtuozzo container")
>
> - osstr = ""
> - have_os = True
> - if self._guest.os.is_container():
> - osstr = _("Linux")
> - elif not distro:
> - osstr = _("Generic")
> - have_os = False
> - elif not version:
> - osstr = _("Generic") + " " + dlabel
> - have_os = False
> - else:
> - osstr = vlabel
> -
> - self.widget("finish-warn-os").set_visible(not have_os)
> - self.widget("summary-os").set_text(osstr)
> + self.widget("finish-warn-os").set_visible(self._os is None)
This will never happen because of the check in _validate_install_page()
and the "finish-warn-os" can be removed completely from the UI.
> + self.widget("summary-os").set_text(self._os and self._os.label or _("Unknown"))
> self.widget("summary-install").set_text(install)
> self.widget("summary-mem").set_text(mem)
> self.widget("summary-cpu").set_text(cpu)
Otherwise the code looks good. Awesome change!
Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20180430/71b40c53/attachment.sig>
More information about the virt-tools-list
mailing list