Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Missing documentation for manifest field input_components #250

Closed
hickford opened this issue Jan 15, 2021 · 8 comments
Closed

Missing documentation for manifest field input_components #250

hickford opened this issue Jan 15, 2021 · 8 comments
Assignees
Labels
bug Something on the site is broken! content extensions Issues related to extensions documentation.

Comments

@hickford
Copy link

hickford commented Jan 15, 2021

https://developer.chrome.com/docs/extensions/mv2/manifest/ and https://developer.chrome.com/docs/extensions/mv3/manifest/ list a manifest field input_components, but it is missing any documentation.

@hickford hickford added the bug Something on the site is broken! label Jan 15, 2021
@hickford
Copy link
Author

@robdodson robdodson assigned awfuchs and dotproto and unassigned awfuchs Jan 19, 2021
@hickford
Copy link
Author

@bderrly Do you have any insights from your experience on https://github.com/google/extra-keyboards-for-chrome-os ?

@bderrly
Copy link

bderrly commented Apr 17, 2021

The lack of documentation has been frustrating. As you pointed out, we have some working examples in that repository. The most difficult to figure out are the language and layout fields. These two have caused the most annoyance as people attempt to use layouts already available in xkeyboard-config or create a new layout based on an existing one.

  • name: free-form text and is what is shown in the input picker in Chrome OS.
  • type: I've never used anything but 'ime' for this field and I don't know what else would be valid.
  • id: a (presumably) unique value across all other IME components.
  • description: free-form text describing what the layout is though I'm not sure where it is displayed.
  • language: I believe this uses the style defined in BCP 47
  • layout: A layout provided in xkeyboard-config.

As I mentioned the two most difficult to get correct are language and layout.

The layout is the name of one of the files in the symbols directory, e.g. us. Within that file are variants such as dvorak. If you want the Dvorak variant of the us layout you use us(dvorak). The variants are named as xkb_symbols "dvorak".

The language is a combination of the language and possibly the region of use. For example, Spanish can be es for basic Spanish language support or it can be es-ES for Spanish (spoken in Spain) or es-MX for Mexican Spanish. I found a few tools to check that a given string is valid: https://r12a.github.io/app-subtags or https://schneegans.de/lv/. Where this gets really fuzzy though is I do not know if every conceivable valid string is actually valid. One person raised an issue asking about Kurdish in Iraq. I would think that means ku-IQ which is valid but it didn't seem to work. It's possible that instead we should use ckb-IQ which is more specific.

@hickford
Copy link
Author

Thanks Brian!

I found some relevant comments about the language and layout fields. For the language field "Both string and list of string are allowed". Whereas "CrOS IME extension manifests should therefore specify one and only one layout per input method".

The most recent committer @tranbaoduy may have more insights https://source.chromium.org/chromium/chromium/src/+/e5caacef0a5d161e83f4eb98ccc5f90457ba84ec

@hickford
Copy link
Author

layouts already available in xkeyboard-config

For completeness, I generated a manifest with all 500+ XKB layouts in one extension https://github.com/hickford/all-xkb-layouts

@hickford hickford changed the title Manifest field input_components is undocumented Missing documentation for manifest field input_components Apr 17, 2021
@hickford
Copy link
Author

Presumably, the input_components field only applies in Chrome OS and does nothing on other platforms?

@bderrly
Copy link

bderrly commented Apr 17, 2021 via email

@jpmedley
Copy link
Contributor

Consolidating under #163

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something on the site is broken! content extensions Issues related to extensions documentation.
Projects
None yet
Development

No branches or pull requests

6 participants