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: show keyboard preview in keyboard details #501

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Nov 22, 2024

From Chiang Mai Hackathon.

Notes:

  1. Only shows on Windows, macOS, and Linux.
  2. Does not show if no web keyboard available.
  3. Does not show if keyboard is deprecated.
  4. Does not show if search is embedded in app (keyboard install flow)
  5. Uses as-yet undocumented osk-host pattern for KMW. (TODO)
  6. Hacks away wrong z-index: 10000 leaking into hosted osk from KMW. (TODO)

image

@mcdurdin mcdurdin added this to the A18S15 milestone Nov 22, 2024
@mcdurdin mcdurdin added the feat label Nov 22, 2024
<div class="download-description">Use $description in your web browser. No need to install anything.</div>
</div>
<a class="download-link" $embed_target href='$url'>Full online editor</a>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you note the rationale why the blue button changed
from "Use keyboard online"
to "Full online editor"? (and removed the subtext)

I don't have a strong preference. (though does "Full online editor" imply a lot more features than what KeymanWeb offers?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Rationale -- I agree that 'full online editor' implies a future version of keymanweb.com which has awesomesauce which we just don't currently have. I wanted to differentiate between the one line test box and the more fully featured keymanweb.com, and am open to other ideas.

I thought "Use keyboard online" was confusing because with this new feature the user will already be using the keyboard online. I removed the subtext because it seemed self-evident as it was below the existing keyboard. (I could add the subtext back again for pages which don't have the preview)

Copy link
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

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

nice feature! lgtm

$build = $json->version;
} else {
// If the get-version API fails, we'll use the latest known stable version
$build = "16.0.145";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be 17.0.332?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably...

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there was still lingering 17.0 style issues
🔗 keymanapp/help.keyman.com#1518

Copy link
Member Author

Choose a reason for hiding this comment

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

Resolved in keymanapp/help.keyman.com#1530 (was a help.keyman.com issue)

// Create a new on screen keyboard view and tell KeymanWeb that
// we are using the targetDevice for context input.
const targetDevice = {
browser: 'chrome', formFactor: 'desktop', OS: '<?=$webDevice?>',
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work on Firefox if we set it to chrome here?

(function() {
keyman.init({attachType:'auto'});
keyman.addKeyboards('@en'); // Loads default English keyboard from Keyman Cloud (CDN)
keyman.addKeyboards('@th'); // Loads default Thai keyboard from Keyman Cloud (CDN)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we load EN and TH keyboards by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an example only ... and long ago that was a good sample of keyboards. We could change it to another example one day.

@darcywong00 darcywong00 modified the milestones: A18S15, A18S16 Nov 24, 2024
@mcdurdin mcdurdin merged commit d1a43b9 into master Nov 25, 2024
2 checks passed
@mcdurdin mcdurdin deleted the feat/show-keymanweb-in-keyboard-details branch November 25, 2024 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants