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

Add configuration page #5

Open
martonmiklos opened this issue Dec 4, 2017 · 8 comments
Open

Add configuration page #5

martonmiklos opened this issue Dec 4, 2017 · 8 comments

Comments

@martonmiklos
Copy link
Collaborator

It would be nice to add a configuration page where some diagnostic data (Word/sec, etc.) can be shown. It shall provide a way to edit the learned words dictionary. The page should serve as a bug reporting page as well.

@rinigus
Copy link
Contributor

rinigus commented Feb 14, 2018

This page would be needed also to tune the configuration. There are several options in Presage that users may want to tune. Few of them:

Selector.SUGGESTIONS
Selector.REPEAT_SUGGESTIONS
Selector.GREEDY_SUGGESTION_THRESHOLD

It would be good to decide on how to implement this. Namely, we can have an app with the settings or try to get settings into Jolla's settings app. While I know how to write an app, I am not that familiar with Jolla's own settings system. Separate app seems cleaner for me from the programming perspective. I'll call this module 'app' in the following, but it could be both.

Next, we need to figure out how to propagate changes in settings, cleaning of databases, from settings app to maliit plugin. I would suggest to use the following:

  • stop keyboard
  • save settings using QSettings by the app for maliit plugin
  • start keyboard and let presage plugin use QSettings to load them

Its rather simple solution, avoids conflicts with accessing database from different processes at the same time. Also, we could then skip DBUS interface and the "Clear word cache" issue #1

@martonmiklos
Copy link
Collaborator Author

Here is an example of how to add a settings page to an existing application:
https://github.com/monich/openrepos-clock-settings

I am not sure how to get an application listed there without having an icon on the apps menu.
The hide tutorial patch came into my mind (which hides the icon from the app screen), but the Tutorial app did not even shown in the settings page.

@rinigus
Copy link
Contributor

rinigus commented Feb 14, 2018

I was mainly thinking about either completely separate app (regular QML with QSettings backend) or something that will integrate into Settings next to "Text input" (but not Apps settings).

@martonmiklos
Copy link
Collaborator Author

martonmiklos commented Feb 14, 2018

will integrate into Settings next to "Text input" (but not Apps settings).

Ah I see it is much better option.

Regarding to the implementation: what if we would not store anything in the 'app' but implement a DBUS based communication between the plugin and the settings UI? Then we could implement the most of the logic in the plugin and we spare the restart cycles.

@rinigus
Copy link
Contributor

rinigus commented Feb 14, 2018

Regarding to the implementation: what if we would not store anything in the 'app' but implement a DBUS based communication between the plugin and the settings UI? Then we could implement the most of the logic in the plugin and we spare the restart cycles.

Well, its harder to implement and, as a result, will take longer time. Since you say that clicking "Clear words" also restarts keyboard, it seems that Jolla considered it as an overkill.

In practice, I would use DBUS or some other communication means if there is constantly a need to transfer data. Changing settings is rather rare event and for that I would prefer simpler solution, if possible.

I can imagine that through QSettings we can implement separate configuration app in few evenings. DBUS will probably take significantly longer, I think.

We could also start with the simpler solution and get to DBUS communication later, if someone is brave to make it. :)

@martonmiklos
Copy link
Collaborator Author

Okay I agree with your concerns. Using the same QSettings from both sides does not require any magic and could be implemented pretty quickly.

@rinigus
Copy link
Contributor

rinigus commented Feb 14, 2018

Excellent! I am not planning to work on such app (yet), mainly will first make the new language database accessible for testing through work on packaging scripts.

@martonmiklos
Copy link
Collaborator Author

As seeing the user reports on the local forums one feature related to this came into my mind:
It would be useful to add a page where the user could type a word and list the predictions in a vertical list (kind of table) and list which prediction came from which predictor. So when someone claiming that hey why is it suggesting the particular word we could decide if it came from the ngrams, or from the learned words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants