Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance reading of the Live keyboard layouts #6220

Conversation

jkonecny12
Copy link
Member

This PR is doing two parts:

  • raise an exception if unsupported keyboard layout is set to the system (ibus methods)
  • add API which allows to read keyboard layouts which are going to be installed to the system without modifying localization module

Related: rhbz#2348726

@jkonecny12
Copy link
Member Author

This is alternative solution to #6219

@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from 0420c19 to d91a45d Compare February 28, 2025 15:15
@jkonecny12
Copy link
Member Author

/kickstart-test --testtype smoke

@@ -0,0 +1,27 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just reuse, KeyboardConfigurationError from pyanaconda/modules/common/errors/configuration.py?
Seems generic enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the benefit? Seems to me that more verbose is better isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point. Errors are not split by the modules as structures etc... In that case we can avoid creating the localization error python module.

@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from d91a45d to b5132ed Compare March 3, 2025 09:28
@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from b5132ed to c57a272 Compare March 3, 2025 09:50
@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from c57a272 to a17ce6a Compare March 3, 2025 11:41
@jkonecny12
Copy link
Member Author

UPDATE:

  • Add test for the missing conversion from and to DBus values

@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from a17ce6a to a141aaf Compare March 3, 2025 11:48
@jkonecny12
Copy link
Member Author

/kickstart-test --testtype smoke

@jkonecny12
Copy link
Member Author

/packit build

Copy link
Contributor

@KKoukiou KKoukiou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works thanks.

# be used in localed
if t[0] != "xkb":
raise KeyboardConfigurationError(
f"Live system has layout which can't be used by Anaconda - {t}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to translate this one? I show it in the Web UI as you noticed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

We don't plan to extend Live specific keyboard configuration but rather
we want to onboard everyone to localed which will be one single
solution.
The Live system (Gnome Shell) supports ibus input methods which are not
supported by Anaconda. Anaconda can't support ibus because vconsole nor
localed supports this because they need to be usable in TTY environment.

Related: rhbz#2348726
This API is added so that web UI is able to read keyboard layouts
without storing them to the localization module.

Related: rhbz#2348726
@jkonecny12 jkonecny12 force-pushed the main-raise-exception-on-usupported-live-layout branch from a141aaf to 9427fd5 Compare March 4, 2025 12:20
@jkonecny12 jkonecny12 deployed to gh-cockpituous March 4, 2025 12:20 — with GitHub Actions Active
@KKoukiou
Copy link
Contributor

KKoukiou commented Mar 4, 2025

/kickstart-test --waive ran already

@KKoukiou KKoukiou merged commit 129d8d5 into rhinstaller:main Mar 4, 2025
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants