simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Dec 5 14:09:13 GMT 2022


TL;DR:
  f0d4705 js: Switch to using the resize handle in the HTML
  d3ef8e6 js: Simplify drawing context management
  b04a2cb js: Correct a comment describing timer_callback
  9cb0abb js: Specify a font for the puzzle canvas in CSS
  83b504a js: Remove a layer of <div> from the HTML page
  db5d3bf js: Remove align=center from main <div> and make it a <main>
  f8ed76f js: Bypass our own dialogue box when loading

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Ben Harris <bjh21 at bjh21.me.uk>
Date:           2022-12-05 14:09:13

commit f0d47053640c18d99252a57466272f53fbabac25
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=f0d47053640c18d99252a57466272f53fbabac25;hp=2522dd249bc30472a8a9a1ae12286cba6542ba9c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Tue Nov 29 23:44:59 2022 +0000

    js: Switch to using the resize handle in the HTML

 emccpre.js | 23 -----------------------
 1 file changed, 23 deletions(-)

commit d3ef8e65dccb76c4a62d7c4f8f38c9fa3dd9b188
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=d3ef8e65dccb76c4a62d7c4f8f38c9fa3dd9b188;hp=f0d47053640c18d99252a57466272f53fbabac25
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Fri Dec 2 23:55:28 2022 +0000

    js: Simplify drawing context management
    
    There's not much point in re-requesting the drawing context from the
    offscreen canvas at the start of each drawing operation.  The canvas
    keeps the context around and returns it on every call to getContext(),
    so we may as well just keep our reference to it too.  This does mean
    that the front-end won't detect puzzles drawing outside of a redraw
    operation, but I think it's the mid-end's job to assert things like
    that.
    
    Rumours that I'm doing this because I had a mysterious bug whereby ctx
    was unexpectedly null are entirely true.

 emcclib.js | 2 --
 emccpre.js | 3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

commit b04a2cba98b82b7424878236798fc90497529ebf
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=b04a2cba98b82b7424878236798fc90497529ebf;hp=d3ef8e65dccb76c4a62d7c4f8f38c9fa3dd9b188
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 3 09:59:21 2022 +0000

    js: Correct a comment describing timer_callback

 emccpre.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 9cb0abb58403a121dddbd78a779a0116ddb65234
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=9cb0abb58403a121dddbd78a779a0116ddb65234;hp=b04a2cba98b82b7424878236798fc90497529ebf
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Mon Dec 5 14:01:53 2022 +0000

    js: Specify a font for the puzzle canvas in CSS
    
    I'd like to use this, but (a) I need it in the HTML for a little while
    first, and (b) I think my current implementation may be a bit fragile.

 html/jspage.pl | 1 +
 1 file changed, 1 insertion(+)

commit 83b504af27c4b8701643fe5d3d3595ac3982d363
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=83b504af27c4b8701643fe5d3d3595ac3982d363;hp=9cb0abb58403a121dddbd78a779a0116ddb65234
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 3 13:54:38 2022 +0000

    js: Remove a layer of <div> from the HTML page
    
    It wasn't doing anything useful, and I was getting fed up with having to
    expand it in the inspector.

 html/jspage.pl | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

commit db5d3bf10e934e86fcdb792f49ae5cf28e1a2a8c
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=db5d3bf10e934e86fcdb792f49ae5cf28e1a2a8c;hp=83b504af27c4b8701643fe5d3d3595ac3982d363
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 3 15:29:53 2022 +0000

    js: Remove align=center from main <div> and make it a <main>
    
    Instead of an align=center HTML attribute, we now centre its contents
    using CSS.  Also, this element contains all the important contents of
    the page, so it seems appropriate to us the HTML5 <main> element for
    this.

 html/jspage.pl | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

commit f8ed76f815494de031c86441bf392f8658ff383d
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=f8ed76f815494de031c86441bf392f8658ff383d;hp=db5d3bf10e934e86fcdb792f49ae5cf28e1a2a8c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Dec 3 23:51:12 2022 +0000

    js: Bypass our own dialogue box when loading
    
    By constructing the <input type=file> off screen and activating it from
    JavaScript, we can jump straight to the browser's upload dialogue box
    without interposing our own one.  This gives a smoother experience, and
    also avoids the difficult-to-handle <input type=file> ever being
    visible.

 emccpre.js | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)



More information about the tartarus-commits mailing list