Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- **Tested: old board copies upgrade cleanly** (v35). Dropping an older `_board.html` on the PDF app keeps its name (no `_board_board`), puts in the newest toolbar, and the ink saved inside it still opens. A test now checks this end to end, starting from a v13 board copy.
- **Select** (v34, PDF app and HTML overlay): a new **Select** button beside ⏱ Timer. Circle ink with the pen (or tap one mark) and a dashed blue box shows what's picked, with a menu beside it:
- **Send a copy to** another class period (P2, P3…): the copy lands in the same spot in that period's ink. Tap more than one period to send it to each.
- **Copy**, then tap the page with Select on and choose **Here** or **Same spot** to paste it: on another page, or in another class period after switching.
Expand Down
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OverBoard PDF</title>
<meta name="description" content="OverBoard: write on any PDF on your smartboard. Runs in the browser; nothing is uploaded.">
<meta name="ob-version" content="906282391b33">
<meta name="ob-version" content="a1a6d509158d">
<meta name="theme-color" content="#1f1f1f">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icons/icon-192.png">
Expand Down Expand Up @@ -45,7 +45,7 @@ <h2 data-t="open_again">Open again</h2>
<p class="note"><span data-th="start_note">Your PDF and your ink stay in this browser on this computer. Nothing is uploaded.
Have a Word file? In Word, choose File → Save as PDF, then drop the PDF here.
Have an HTML worksheet? Drop it here to get a <i>_board.html</i> copy you can write on.</span>
<br><a href="../" data-t="back_demo">Back to the HTML worksheet demo</a> · <a href="https://github.com/BPMData/OverBoard" data-t="about">About OverBoard</a> · <a href="report/?from=start" target="_blank" data-t="board_help">Board not working?</a> · <span id="ob-release" title="OverBoard version">v34</span></p>
<br><a href="../" data-t="back_demo">Back to the HTML worksheet demo</a> · <a href="https://github.com/BPMData/OverBoard" data-t="about">About OverBoard</a> · <a href="report/?from=start" target="_blank" data-t="board_help">Board not working?</a> · <span id="ob-release" title="OverBoard version">v35</span></p>
<p class="note ob-langpick"><label><span aria-hidden="true">🌐</span> <select id="ob-lang" aria-label="Language" data-ta="language" data-tt="language" title="Language"></select></label></p>
</div>
</main>
Expand Down
2 changes: 1 addition & 1 deletion app/report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ <h1 data-t="r_h1">Is OverBoard not working on your board?</h1>
<p data-th="r_intro2">If something doesn't work the way the page asks, that's fine. <b>That's exactly what I need to know.</b> Just keep going.</p>
<p class="mute small" data-th="r_privacy">Nothing is sent until you press <b>Send</b> at the very end, and you'll see everything first. No worksheets, PDFs or ink are ever included.</p>
<div class="row"><button class="go big" data-go="start" data-t="r_start">Start</button></div>
<p class="mute small" style="margin-top:28px">OverBoard <span id="ob-release" title="OverBoard version">v34</span></p>
<p class="mute small" style="margin-top:28px">OverBoard <span id="ob-release" title="OverBoard version">v35</span></p>
</div></div>
</section>

Expand Down
10 changes: 5 additions & 5 deletions app/sw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ===== GENERATED by tools/build.py: every file the app needs, with the start of its SHA-256. Do not edit by hand. =====
const VERSION = '4f666f5d5880';
const VERSION = '9b25193c784a';
const FILES = {
"../overlay/ink_overlay.html": "0f0ce25a1b3a2799",
"../overlay/ink_overlay.html": "0e27675d1ec4908f",
"../shared/ink-core.js": "84be8f49eeb4d2d3",
"../shared/strings.js": "e84c83bf93320729",
"../shared/toolbar.css": "55e88770a7c0f1c2",
Expand All @@ -14,14 +14,14 @@ const FILES = {
"icons/icon-192.png": "d245e15b36475003",
"icons/icon-512.png": "17c1021fe2a0ade1",
"icons/maskable-512.png": "0c58f1bdccc9eda9",
"index.html": "b1a6f0373a47e0a7",
"index.html": "74f77552bac14322",
"ink.js": "253f8d907ccfbc1b",
"libs.js": "c09f60186ab9029a",
"main.js": "48ecaa409acb49b9",
"manifest.json": "f7ee4a6c6f83cd40",
"notebook.js": "47bcfd4f80712344",
"offline.js": "6504935b2738711a",
"report/index.html": "cfbbe266ae64b031",
"report/index.html": "720cab90cc9b146f",
"store.js": "66af54cd32e6cbd2",
"textlayer.js": "1911308ed3e2a8b5",
"vendor/[email protected]/LICENSE.md": "f2c9fc00fdb66eb9",
Expand Down Expand Up @@ -214,7 +214,7 @@ const FILES = {
"vendor/[email protected]/standard_fonts/LiberationSans-BoldItalic.ttf": "a224075ac17495ad",
"vendor/[email protected]/standard_fonts/LiberationSans-Italic.ttf": "832b4406dbef2362",
"vendor/[email protected]/standard_fonts/LiberationSans-Regular.ttf": "f8ace1f892b2bd9d",
"version.json": "392fdd1012b6c5e1",
"version.json": "f2e202f1f6845553",
"viewer.js": "648b4479c5b68b93"
};
// ===== END GENERATED =====
Expand Down
2 changes: 1 addition & 1 deletion app/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"v": "906282391b33",
"v": "a1a6d509158d",
"js": [
"embed.js",
"export.js",
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2>Exit ticket</h2>
<div class="lines"><div></div><div></div><div></div><div></div></div>
<div class="foot">OverBoard · page 2 / 2 · Your ink saves in this browser only. Nothing is uploaded.</div>
</div>
<!-- ===== INK OVERLAY START (v34) =====
<!-- ===== INK OVERLAY START (v35) =====
Smartboard writing layer. Paste this whole block just before </body> in any .html file.
SMART BOARD: pen tip writes. Palm, fist or side of hand erases (the board reports it as an eraser).
Finger (and the round end of the SMART pen) scrolls the page; the "Finger" button switches it to drawing if you lose the pen.
Expand Down
2 changes: 1 addition & 1 deletion overlay/ink_overlay.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- ===== INK OVERLAY START (v34) =====
<!-- ===== INK OVERLAY START (v35) =====
Smartboard writing layer. Paste this whole block just before </body> in any .html file.
SMART BOARD: pen tip writes. Palm, fist or side of hand erases (the board reports it as an eraser).
Finger (and the round end of the SMART pen) scrolls the page; the "Finger" button switches it to drawing if you lose the pen.
Expand Down
25 changes: 25 additions & 0 deletions tests/html.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const path = require('path');
const { execFileSync } = require('child_process');
const { test } = require('@playwright/test');
const { expect, fixture, openApp, openPdf, download, fileMenu } = require('./support/app');
const { overlayReady, savedInk } = require('./support/overlay');

const ROOT = path.join(__dirname, '..');
const overlay = () => fs.readFileSync(path.join(ROOT, 'overlay', 'ink_overlay.html'), 'utf8').trim();
Expand Down Expand Up @@ -49,6 +50,30 @@ test('older overlay is upgraded and its saved ink kept', async ({ page }, info)
expect(r.msg).toMatch(/upgraded v13 → v\d+, saved ink kept/);
});

test('an old _board.html dropped on the app keeps its name, and the upgraded copy opens with its ink', async ({ page }, info) => {
const src = info.outputPath('Lesson_board.html');
fs.copyFileSync(fixture('Old_v13.html'), src);
const r = await boardCopy(page, src, info);
expect(r.name).toBe('Lesson_board.html'); // not Lesson_board_board.html
expect(r.msg).toMatch(/upgraded v13 → v\d+, saved ink kept/);
const errors = [];
page.on('pageerror', (e) => errors.push(e.message));
await page.goto('/' + path.relative(ROOT, r.file).split(path.sep).map(encodeURIComponent).join('/'));
await overlayReady(page);
await expect(page.locator('#ink-bar [data-act="select"]')).toBeVisible(); // today's toolbar
await page.evaluate(async () => { // write one more line, so the ink is saved and can be read back
const c = document.getElementById('ink-canvas'), b = c.getBoundingClientRect(), y = b.top + 200;
const ev = (t, x) => c.dispatchEvent(new PointerEvent(t, { bubbles: true, cancelable: true, pointerType: 'pen', pointerId: 3, buttons: t === 'pointerup' ? 0 : 1, button: 0, clientX: x, clientY: y }));
ev('pointerdown', b.left + 400);
for (let x = 410; x <= 600; x += 10) { await new Promise((r) => setTimeout(r, 4)); ev('pointermove', b.left + x); }
await new Promise((r) => setTimeout(r, 20)); ev('pointerup', b.left + 600);
});
const ink = await savedInk(page);
expect(ink.periods.P1).toHaveLength(2);
expect(ink.periods.P1[0]).toEqual({ c: '#111', w: 2, e: 0, p: [1, 2, 3, 4] }); // the v13 ink, as it was
expect(errors).toEqual([]);
});

test('a board copy that is already current is left alone', async ({ page }, info) => {
const r = await boardCopy(page, fixture('Old_v13.html'), info);
await page.setInputFiles('#ob-file', r.file);
Expand Down
Loading