mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-08 08:37:42 +00:00
Prototype predictive ui test page!
This commit is contained in:
parent
05c8d734f8
commit
20b89e52d6
4 changed files with 115 additions and 1 deletions
|
|
@ -208,6 +208,7 @@ namespace com.keyman.osk {
|
|||
private updateText() {
|
||||
let display = this.generateSuggestionText();
|
||||
this.div.replaceChild(display, this.display);
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,13 +19,14 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>KeymanWeb 10 Testing</h1>
|
||||
<h1>KeymanWeb 12 Testing</h1>
|
||||
<h2><a href="./unminified.html">Test unminified Keymanweb</a></h2>
|
||||
<h2><a href="./unminified - manual.html">Test unminified Keymanweb in manual-attachment mode.</a></h2>
|
||||
<h2><a href="./keyboard-errors/">Tests keyboard error-handling functionality</a></h2>
|
||||
<h2><a href="./attachment-api/?mode=auto">Tests the new Attachment/Enablement API functionality</a><h2>
|
||||
<h2><a href="./chirality/">Chirality testing/bootstrapping</a><h2>
|
||||
<h2><a href="./platform/">Platform testing</a></h2>
|
||||
<h2><a href="./prediction-ui/">Prediction UI testing</a></h2>
|
||||
<h2><a href="./toolbar/">Toolbar UI testing</a></h2>
|
||||
<h1>Auto-attachment mode tests</h1>
|
||||
<h2><a href="./issue29">Test desktop MutationObserver functionality</a></h2>
|
||||
|
|
|
|||
94
web/testing/prediction-ui/index.html
Normal file
94
web/testing/prediction-ui/index.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- Set the viewport width to match phone and tablet device widths -->
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no" />
|
||||
|
||||
<!-- Allow KeymanWeb to be saved to the iPhone home screen -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
|
||||
<!-- Enable IE9 Standards mode -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
<title>KeymanWeb Sample Page - Unminified Source</title>
|
||||
|
||||
<!-- Your page CSS -->
|
||||
<style type='text/css'>
|
||||
body {font-family: Tahoma,helvetica;}
|
||||
h3 {font-size: 1em;font-weight:normal;color: darkred; margin-bottom: 4px}
|
||||
.test {font-size: 1.5em; width:80%; min-height:30px; border: 1px solid gray;}
|
||||
#KeymanWebControl {width:50%;min-width:600px;}
|
||||
</style>
|
||||
|
||||
<!-- Insert uncompiled KeymanWeb source scripts -->
|
||||
<script src="../../release/unminified/web/keymanweb.js" type="application/javascript"></script>
|
||||
|
||||
<!--
|
||||
For desktop browsers, a script for the user interface must be inserted here.
|
||||
|
||||
Standard UIs are toggle, button, float and toolbar.
|
||||
The toolbar UI is best for any page designed to support keyboards for
|
||||
a large number of languages.
|
||||
-->
|
||||
<script src="../../release/unminified/web/kmwuitoggle.js"></script>
|
||||
|
||||
<!-- Initialization: set paths to keyboards, resources and fonts as required -->
|
||||
<script>
|
||||
var kmw=window.keyman;
|
||||
kmw.init({
|
||||
attachType:'auto'
|
||||
}).then(function() {
|
||||
kmw.addKeyboards({id:'us',name:'English',languages:{id:'en',name:'English'}, filename:'../us-1.0.js'});
|
||||
|
||||
var modelStub = {'id': 'example.en.wordlist',
|
||||
languages: ['en'],
|
||||
path: (window.location.href + "simple-en-wordlist.js")
|
||||
};
|
||||
kmw.modelManager.register(modelStub);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<!-- Sample page HTML -->
|
||||
<body>
|
||||
<h2>KeymanWeb Sample Page - Predictive Text UI (bootstrapping rig)</h2>
|
||||
<p>As we're currently developing the predictive text feature, this page is subject to break as model
|
||||
specifications change and new features are added. Please update the backing model file as necessary.
|
||||
</p>
|
||||
<div>
|
||||
<!--
|
||||
The following DIV is used to position the Button or Toolbar User Interfaces on the page.
|
||||
If omitted, those User Interfaces will appear at the top of the document body.
|
||||
(It is ignored by other User Interfaces.)
|
||||
-->
|
||||
<div id='KeymanWebControl'></div>
|
||||
|
||||
<h3>Type in your language in this text area:</h3>
|
||||
<textarea id='ta1' class='test' placeholder='Type here'></textarea>
|
||||
|
||||
<h3>or in this input field:</h3>
|
||||
<input class='test' value='' placeholder='or here'/>
|
||||
|
||||
<h3><a href="./">Return to testing home page</a></h3>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<!--
|
||||
*** DEVELOPER NOTE -- FIREFOX CONFIGURATION FOR TESTING ***
|
||||
*
|
||||
* If the URL bar starts with <b>file://</b>, Firefox may not load the font used
|
||||
* to display the special characters used in the On-Screen Keyboard.
|
||||
*
|
||||
* To work around this Firefox bug, navigate to <b>about:config</b>
|
||||
* and set <b>security.fileuri.strict_origin_policy</b> to <b>false</b>
|
||||
* while testing.
|
||||
*
|
||||
* Firefox resolves website-based CSS URI references correctly without needing
|
||||
* any configuration change, so this change should only be made for file-based testing.
|
||||
*
|
||||
***
|
||||
-->
|
||||
</html>
|
||||
18
web/testing/prediction-ui/simple-en-wordlist.js
Normal file
18
web/testing/prediction-ui/simple-en-wordlist.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue