Chrysalis
Chrysalis copied to clipboard
Host layout selection issues
Describe the bug
The widget letting us select the host-side layout has a number of shortcomings: ordering is weird, the initial rendering is slow, and searching isn't very convenient either.
To Reproduce
Steps to reproduce the behavior:
- Go to the Editor screen.
- Click on the "Linux layout" (or "Windows", or "macOS") dropdown.
- ~~Observe it takes a long time to open.~~
- ~~Open the developer console, and observe that we have a warning about it too (
[Violation] 'click' handler took 1150ms)~~ - ~~Scroll around, and observe that the language groups aren't sorted by their display name (
Chineseis sorted afterEnglish), but their language code instead.~~ - ~~Also observe that Material-UI complains about having duplicate headers.~~
Expected behavior
~~The selector should open much faster, and sort the languages by their display name.~~
We should also display a preview of the layout, perhaps not while scrolling in the dropdown, but once a layout is selected, so that we can double check that it is the one we seek, without having to go to the keymap editor.
IF possible the selector should initaly show the installed / active layouts on the users system first, and only search through the whole list as a second step.
Sadly, I don’t believe operating systems offer us that information. … On May 2, 2021, at 10:16 AM, just_A_key @.***> wrote: IF possible the selector to initaly show the installed / active layouts on the users system first, and only search through the whole list as a second step. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I believe Windows has something like https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.inputlanguage.installedinputlanguages?view=net-5.0
Sadly, I don’t believe operating systems offer us that information.
On May 2, 2021, at 10:16 AM, just_A_key @.***> wrote:
IF possible the selector to initaly show the installed / active layouts on the users system first, and only search through the whole list as a second step.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
We have made some progress on this: we're pregenerating the data now, so opening is much, much faster. Other issues still persist.
This is pretty similar to #1010, and since this was sooner, I'll close that one.
With #1018 and #1019, and the CLDR data pregeneration already implemented on master, this issue is largely addressed.
One thing we talked about with @obra, which has not been mentioned here yet, is that ideally, we'd want to load both osx and windows layouts, and - by default - offer only the set available for the current platform. Linux would default to Windows (the chromeos layouts are unsuitable for our use case), because in my experience, the two largely agree on layouts, but both of them seem to disagree with osx from time to time.