Hi folks,
pull request updated and now in a stable that I'd be comfortable merging:


   - Simplified the code significantly, relying mostly on select2
   auto-magic conversion on an existing select
   - The Select2DropDownChoice is now a DropDownChoice subclass, so removed
   the extra special testing code
   - Added code to mimick native drop down keyboard behavior. It's not 100%
   the same, but got as close as possible (the one deviation that I'm aware
   of, if you type in a closed native select it will take into account all
   chars you typed to select the best match, this version only looks for the
   first one, e.g., has no state).
   - Added more select2 based drop downs around, but only for long lists
   (mostly based on Torbens' suggestions, but could not easily migrate the
   preview one)

I did not do a full migration, as I don't have time to test all pages one
by one, but I guess we can switch pages a bit at a time, also based on
actual need?

The code is fully javascript in the end, so not testable in WicketTester.
I've done my best to test by hand, other testers more than welcomed :-)


On Mon, Jan 22, 2018 at 8:05 PM, Torben Barsballe <
tbarsba...@boundlessgeo.com> wrote:

> On Sun, Jan 21, 2018 at 10:07 AM, Andrea Aime <
> andrea.a...@geo-solutions.it> wrote:
>> On Mon, Jan 15, 2018 at 7:06 PM, Torben Barsballe <
>> tbarsba...@boundlessgeo.com> wrote:
>>> UI improvements are always nice, and this seems like a particularly
>>> useful one.
>>> The style differences relative to native drop-downs are a bit annoying,
>>> but seem fine. One possible alternate workaround for that would be to style
>>> the regular drop-downs so that they are the same between browsers. That
>>> should be as simple as adding a bit of CSS (Although most of the methods I
>>> could find for this used a background image to replace the select, so this
>>> workaround seems a bit finicky).
>> Indeed... I looked around but could not find an approach that would scale
>> well along the the base system font size changes... (there are some
>> bootstrap based examples that might work, but we don't use bootstrap in
>> GeoServer so...).
> Ah, forgot about scaling; yeah that would make things rather more
> difficult.
>> Can you think of any other case in the UI that would benefit from having
>> the select2 list?
> Hmm... List of requests on the Demo requests page. Likewise, list of WPS
> processes on the WPS request builder demo. Preview format on Layer Preview
> page.
> You could maybe change the CRS fields on the Layer / Layer group edit page
> to use it, but that seems like a bit more work.
>>> I think we should probably avoid replacing all drop-downs with the
>>> select2 one just for style reasons, seems like it could be a bit
>>> annoying/unnecessary where there are only a few options.
>> Yeah, I was wondering myself. Personally I'd prefer visual consistency
>> but I have no strong opinion on this one, happy to leave it as is.
>>> One thing I did notice is that the select2 drop-down doesn't support
>>> keyboard navigation (tab + arrow keys), unlike a regular select. That seems
>>> like another good reason to only use it where necessary.
>> That is indeed annoying (although not sure how keyboard friendly the UI
>> is to start with).
> From what I have seen / tried, navigating by keyboard is a bit finicky,
> but still technically doable.
>> Hmmm... seems like it may be fixable, I'll have a look into it:
>> https://github.com/select2/select2/issues/3472
>> If a viable fix comes out of that, then I wouldn't see an issue with
> replacing all select boxes with the select2 one. As-is, I think the
> accessibility improvement of the regular select boxes outweighs the style
> consistency.
> Cheers,
> Torben



Andrea Aime

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.

Ing. Andrea Aime
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549



Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list

Reply via email to