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

feat(developer): add hint support to Touch Layout Editor and schema 🙊 #6936

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Jul 12, 2022

@keymanapp-test-bot skip

I ended up with all the changes in one PR to support hints in Keyman Developer and the schema.

I reworked the touch layout editor to support hints, including moving the main control toolbar so that additional properties could be neatly fit into the design.

image

Green coloured hint text indicates that the hint has been customised:
image

I moved the delete button off the key cap itself so that it doesn't overlap the hint text:
image

I moved the controls off the top and into a left-hand-side toolbar, moving some functions into Edit dialogs so we have more flexibility for future functionality:
image

Hint text shows a placeholder of the default hint (in this case from the longpress) if no custom hint has been applied:
image

Platform properties dialog:
image

View options dialog:
image

Note that the "Show all modifier options" check box would be rarely used so it's good to get it out of the main UI.

@mcdurdin mcdurdin requested a review from jahorton as a code owner July 12, 2022 20:40
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jul 12, 2022

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

@mcdurdin mcdurdin changed the title feat(developer): add hint properties to touch layout schema 🚦 feat(developer): add hint properties to touch layout schema 🙊 Jul 12, 2022
@mcdurdin mcdurdin requested a review from darcywong00 as a code owner July 13, 2022 22:55
@mcdurdin mcdurdin added this to the A16S6 milestone Jul 13, 2022
@mcdurdin mcdurdin changed the title feat(developer): add hint properties to touch layout schema 🙊 feat(developer): add hint support to Touch Layout Editor and schema 🙊 Jul 13, 2022
@mcdurdin mcdurdin force-pushed the feat/developer/touch-layout-schema-high-quality branch 2 times, most recently from 1cb0444 to 51a94a1 Compare July 14, 2022 00:58
mcdurdin added 6 commits July 14, 2022 10:58
Also fixes a couple of minor issues with character map integration and
Unicode text fields.
Moves the top toolbar to the left to make more room, and tidy it up,
and moves various controls into sub-dialogs to make them clearer.

Shortcut buttons to prepopulate the Hint property will come in a
subsequent PR.
Most dialogs in touch layout editor can now have just a Close
button with changes taking effect immediately. This helps users
visualize how the options they've chosen will work.
After a demo of the Touch Layout Editor @jahorton suggested using a
"default hint" model instead of the "display hint" from the design spec.
I liked this and have reworked the design accordingly. With the default
hint model, a source for the hint text can be specified, such as the
default longpress key, or a specific flick key. This can then be
overridden on a key level.

The hint input element now shows a placeholder to indicate the default
hint for the key, and if a hint has been customised for a given key, it
is shown in green on the key cap.

Changing the default hint does not impact any customised hints.
@mcdurdin mcdurdin force-pushed the feat/developer/5079-touch-layout-hints branch from 81e389a to 6032181 Compare July 14, 2022 00:59
Copy link
Contributor

@jahorton jahorton left a comment

Choose a reason for hiding this comment

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

Design's a definite LGTM, and most of the code is as well. I do have a few concerns re: the documentation, though.

common/schemas/keyman-touch-layout/README.md Show resolved Hide resolved
common/schemas/keyman-touch-layout/README.md Show resolved Hide resolved
common/schemas/keyman-touch-layout/README.md Outdated Show resolved Hide resolved
@mcdurdin mcdurdin modified the milestones: A16S6, A16S7 Jul 24, 2022
Base automatically changed from feat/developer/touch-layout-schema-high-quality to feat/developer/touch-layout-compiler-flick-and-multitap July 25, 2022 09:57
Base automatically changed from feat/developer/touch-layout-compiler-flick-and-multitap to feat/developer/touch-layout-editor-flick-and-multitap July 25, 2022 09:58
@mcdurdin mcdurdin merged commit b438a20 into feat/developer/touch-layout-editor-flick-and-multitap Jul 25, 2022
@mcdurdin mcdurdin deleted the feat/developer/5079-touch-layout-hints branch July 25, 2022 09:58
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 16.0.38-alpha

@MayuraVerma
Copy link
Contributor

How to disable default "." for hint?
Is adding "space" a good way?
How to display "ZWJ" or "ZWNJ" symbol along with text?

@mcdurdin
Copy link
Member Author

mcdurdin commented Sep 4, 2023

How to disable default "." for hint?

In version 17+, this can be done in the touch layout editor in the Platform properties dialog:

image

Is adding "space" a good way?

I don't really understand this question!

How to display "ZWJ" or "ZWNJ" symbol along with text?

@MayuraVerma
Copy link
Contributor

This "Default Hint Source" option is not present in latest developer
image

"Is adding "space" a good way?
I don't really understand this question!"
I am using "Space" as custom hint to clear the "dot". Looks like there will be a new option to set "No default hint". However this feature is still not avaiable in 17.0.185 alpha developer.
when the option is implemented. If user wants a custom text on few keys, then he/she sets the option to "No default hint" and add custom text only to keys needed? Is it the idea?

Two Unicode fields could be confusing. It could be "Hint_Text" and "Hint_Unicode", instead.
image

Is custom hint implemented in

@MayuraVerma
Copy link
Contributor

How to show ZWNJ symbol along with a text for "Key display text"

@mcdurdin
Copy link
Member Author

mcdurdin commented Oct 9, 2023

This "Default Hint Source" option is not present in latest developer

This is a platform-level property, not a global option for the touch layout. It should be present in 17.0.185-alpha

If user wants a custom text on few keys, then he/she sets the option to "No default hint" and add custom text only to keys needed? Is it the idea?

Yes, that's correct.

Two Unicode fields could be confusing. It could be "Hint_Text" and "Hint_Unicode", instead.

Good point. Can we you this in a separate issue?

How to show ZWNJ symbol along with a text for "Key display text"

Currently, we don't support *ZWNJ* text -- the symbol must be the entire key cap text of *ZWNJ*. If this is a feature you'd like, can you open an issue for it so we can track it?

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

Successfully merging this pull request may close these issues.

4 participants