Mailinglist Archive: yast-devel (35 mails)

< Previous Next >
Re: [yast-devel] Table sorting and locales in YaST UI
On Fri May 4 2012 10:51:51 Jiri Srain wrote:
Dne 4.5.2012 11:19, Ladislav Slezak napsal(a):
Dne 4.5.2012 10:31, Thomas Goettlicher napsal(a):
On Thu May 3 2012 16:08:56 Ladislav Slezak wrote:
[...]

- The numeric sorting problem can be solved by padding numbers with
zeroes instead of spaces e.g. "090" instead of " 90" - it does not
look nice but I haven't found any better solution. Any idea? (I tried
some tricks with UTF-8 non-breakable space but that didn't help.)

I'd propose _NOT_ to add zeros to the ycp code, because it makes the
table unreadable. It's an UI issue that needs to be fixed in the UI.


I just fixed the numeric sorting in yast2-qt (version 2.22.6). Columns
that contain digits only are sorted in numeric order now.

Wow, good idea! Thanks!

Would it be possible to put a regexp there? I mean, the repository module
display the priority number but for 99 it adds _(" (default)") suffix so
the actual displayed value is "99 (default)". That's because users can
easily see what's the default and which repos have higer/lower priority
than the default.

Actually, anything that starts with a number should IMHO be sorted
numerically according the number alone. The text, which is possibly
appended to the number, should be taken into account only if there are
two items with the same number (not the case mentioned above).

Just for completeness, I don't think that we need to solve exceptions
like e.g. date (where sorting should work according to the date),
however, I'm not aware of any single place in YaST where it could be used.
I agree, we don't need an over-engineered solution.


Cheers,
Thomas


Jiri

(BTW the default value 99 looks strange, at least for me, I would use
100... This is another reason to explicitly tell users that value 99 is
OK.)


Or any other idea to force numeric sorting even for not completely
numeric values?



--

Ladislav Slezák
Appliance department / YaST Developer
Lihovarská 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
lslezak@xxxxxxxx
SUSE

--
Thomas Goettlicher
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer,
HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
< Previous Next >