Ryan Harper
7cbf8c2b69
pep8 fixes for subiquitycore/ui/form.py
2018-05-24 16:51:51 -05:00
Michael Hudson-Doyle
cbd5afe2c0
move imports of i18n higher so _ is always installed before tests are imported
2018-05-21 10:14:34 +12:00
Michael Hudson-Doyle
11708703c9
move titles, footers, excerpts from controller to view
...
read title and footer from the view instance, make views respsonsible for rendering
the excerpt
adapts infrastructure, welcome, keyboard, network views
2018-05-18 15:55:49 +12:00
Michael Hudson-Doyle
960f51ca91
remove view argument to Form.as_rows and friends
2018-05-07 10:57:35 +12:00
Michael Hudson-Doyle
688a270c17
a round of marking strings as translatable and ensuring translations are actually displayed in the UI
2018-04-19 10:29:08 +12:00
Michael Hudson-Doyle
2d3d500e34
a couple of tweaks to make more translated strings appear
2018-04-18 20:18:15 +12:00
Michael Hudson-Doyle
5a6ad92239
add some validation to URLEditor
2018-04-12 09:43:02 +12:00
Michael Hudson-Doyle
13eaa5c9dc
add a bare-bones proxy model/view/controller
2018-04-09 15:05:46 +12:00
Michael Hudson-Doyle
028914da97
another small helper
2018-04-09 14:37:26 +12:00
Michael Hudson-Doyle
59a500c9e5
add more space between form rows, align help to the left
2018-03-14 14:58:58 +13:00
Michael Hudson-Doyle
ca953ea01f
improve scrolling experience
...
Before this change, subiquity has lots of ListBoxes that just contain a single
Pile containing all their contents. This is (a) a bit silly (b) make some parts
of the scrolling experience a bit poor, for example urwid tries to scroll all
of a ListBox element into view when it gets focus but this is defeated by
shoving all the elements into a Pile (this causes
https://bugs.launchpad.net/subiquity/+bug/1750058 and a few other strange
bits).
The fix for this is obvious (don't wrap ListBox elements in a Pile) but this
breaks some aspects of tab cycling (when you shift tab back into a listbox you
want the last element of the box to be both selected and scrolled into view,
that sort of thing). Fixing all these bits of broken behaviour required
rewriting the tab cycling implementation to the point of copy/paste/hack-ing
the Pile.keypress method. Rather than doing the same for Columns, I just
prevent the creation of Columns with more than 1 selectable, which as we want
subiquity to be navigable with up/down/return does not seem so bad.
As penitence for all this, I've added a bunch of commentary explaining what is
going on.
2018-03-14 14:35:27 +13:00
Michael Hudson-Doyle
c57f0057f3
simplifications
2018-03-14 14:20:53 +13:00
Michael Hudson-Doyle
9ba11aedb5
change how ssh import field works
...
This is the only place in subiquity today where we have selectable fields side
by side, which contradicts the goal to be able to navigate subiquity with up,
down and enter keys only. Replace the existing fancy widget with two fields,
one to select the import source and one to enter the username.
Also remove the "Ubuntu SSO" option as that has never worked.
2018-03-14 14:07:03 +13:00
Michael Hudson-Doyle
923df8d0b2
allow forms to override name of cancel button
2018-01-12 12:56:24 +13:00
Michael Hudson-Doyle
c60d37f275
some testing ideas
2017-11-27 21:51:39 +13:00
Michael Hudson-Doyle
ad95cdd4d7
Merge pull request #255 from CanonicalLtd/vorlon/fix-up-tests
...
fix tests slightly
2017-11-27 09:09:08 +13:00
Michael Hudson-Doyle
c85602527e
stop any of the *_btn functions defining a label by default
2017-11-22 13:53:35 +13:00
Steve Langasek
ae1b8c2e66
Import i18n module before use.
2017-10-09 17:28:21 +00:00
Michael Hudson-Doyle
f5637a717e
a start at a more sophisticated ssh identity widget
2017-10-06 15:39:14 +13:00
Michael Hudson-Doyle
b06d1a78c4
improve validation of hostname and username fields
...
not sure hostname validation makes perfect sense but at least it is a bit
more transparent now
2017-10-05 22:14:44 +13:00
Michael Hudson-Doyle
a73b76c7d2
clear any validation error as soon as the field becomes valid
...
this is why I changed size's validation to be side-effect free in the last
commit...
2017-10-05 16:19:31 +13:00
Michael Hudson-Doyle
876e2dc1b7
change partition size field to only modify user input explicitly on loss of focus
2017-10-05 16:16:31 +13:00
Michael Hudson-Doyle
eafd614ce9
simplify things a bit by removing the ability to pass validator= and cleaner= to form fields
2017-10-05 15:45:16 +13:00
Michael Hudson-Doyle
35988f2fd9
change form machinery to always have space for validation error
...
and display help, if present, there by default
2017-10-05 15:08:10 +13:00
Michael Hudson-Doyle
14fa3cd107
use button_pile helper everywhere
2017-09-20 15:20:32 +12:00
Michael Hudson-Doyle
9356501aa7
change cancel buttons to back buttons where appropriate
...
and also some "Done" buttons become "Save" buttons.
2017-09-18 17:19:27 +01:00
Michael Hudson-Doyle
a0fd94c0c4
remove connect_signal wrapper
2017-09-15 11:48:07 +12:00
Michael Hudson-Doyle
ef54021b21
convert identity view
2017-09-15 11:04:38 +12:00
Michael Hudson-Doyle
44b9334a28
allow editing partitions
...
there is some wonky stuff around mount point validation, to be fixed next
2017-09-05 14:25:21 +12:00
Michael Hudson-Doyle
4a54ca9e50
start making the partition form usable in other views
2017-09-05 11:58:49 +12:00
Michael Hudson-Doyle
62ad81d690
make sure wifi psk is between 8 and 63 characters long
2017-03-21 14:39:23 +13:00
Michael Hudson-Doyle
0d48ef1836
avoid wrapping captions in forms
2017-03-13 11:52:19 +13:00
Michael Hudson-Doyle
8cd4b020ee
finish formatting/mounting available partitions
2017-03-10 15:46:21 +13:00
Michael Hudson-Doyle
66c1d94a4b
consolidate mountpoint validation a bit
2017-03-07 21:10:03 +13:00
Michael Hudson-Doyle
2a1fbcd6fe
remove some help leftovers
2017-02-16 12:36:26 +13:00
Michael Hudson-Doyle
308a29c75b
move help to an overlay
2017-02-14 16:16:19 +13:00
Michael Hudson-Doyle
906af4d41a
simplify forms and edit widgets a bit
2017-02-14 15:16:12 +13:00
Michael Hudson-Doyle
3353c851ee
make help appear in same place on identity view as before
2017-02-13 15:50:39 +13:00
Michael Hudson-Doyle
a2062aaf57
convert identity view to use new validation stuff
...
help looks different though
2017-02-13 15:37:29 +13:00
Michael Hudson-Doyle
e58697a29c
simplify api around enabling form fields
2017-02-13 15:12:04 +13:00
Michael Hudson-Doyle
1bd00a843a
allow form fields to be enabled or disabled
2017-02-13 14:59:25 +13:00
Michael Hudson-Doyle
00c807dc9e
convert add_partition view to new world
...
no enabling/disabling yet though
2017-02-13 14:48:53 +13:00
Michael Hudson-Doyle
ee966f7039
rewrite validation stuff into something like a form library
...
This is inspired by the sort of design e.g. Django uses for its forms.
2017-02-13 14:21:26 +13:00