Skip to content

Bug fixes and UX improvements#2

Open
jowtron wants to merge 5 commits into
ballantynedewolf:masterfrom
jowtron:bugfixes-and-improvements
Open

Bug fixes and UX improvements#2
jowtron wants to merge 5 commits into
ballantynedewolf:masterfrom
jowtron:bugfixes-and-improvements

Conversation

@jowtron

@jowtron jowtron commented Jan 18, 2026

Copy link
Copy Markdown

Summary

  • Fixed some bugs mentioned in the README
  • Added a few UX improvements
  • CSS vertical centering for letter chart pages (adapted from pablo-knight/WolfChartOptotype)

Changes

Bug fixes:

  • Added missing isShuffled and isDuo initialisation in objWolf
  • Fixed implicit global variables in for loops
  • Removed duplicate swapSVGLayers function

UX improvements:

  • Help ? buttons now toggle closed when clicking the same one
  • Cursor only hides after 1s inactivity on chart areas (not immediately on load)
  • Vertical centering for letter chart pages

Happy to revert any of the UX changes if you prefer the original behaviour!

🤖 Vibe coded with Claude

jowtron and others added 3 commits January 18, 2026 14:55
Bug fixes:
- Add missing isShuffled and isDuo state initialization in objWolf
- Fix implicit global variables in shuffleLetters and UnShuffleFunction for loops
- Remove duplicate swapSVGLayers function inside fullscreenChange, use class method

UX improvements:
- Help button toggle: clicking same ? closes panel, different ? navigates
- Cursor behavior: only hides after 1s inactivity on chart areas, not on load

CSS improvement:
- Vertical centering for letter chart pages (adapted from pablo-knight/WolfChartOptotype)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace CSS transform positioning on <svg> elements with flexbox
centering on parent divs, which avoids SVG 1.0 transform issues on
mobile Chrome. Apply mirror (scale) to parent div instead of SVG.
Add href alongside xlink:href on <use> elements for modern browser
compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jowtron jowtron force-pushed the bugfixes-and-improvements branch from 6f6b1b1 to eb01da5 Compare February 10, 2026 09:05

@ballantynedewolf ballantynedewolf left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is my first ever review!
I like the code cleanups. Don't like the change to cursor behaviour. Do like the changes to the help section behaviours.
I've got several changes in progress locally - updating the css to flexbox grid, adding options for letter chart display, adding some new charts, dealing with smaller displays, getting proper fullscreenchange behaviour - so as soon as we resolve this review, I'll make a branch for that stuff

Comment thread index.html Outdated
Comment on lines +561 to +570

/* Vertically center letter chart pages */
#letterChart .chart.V {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The next major version does this as part of a larger change to the way letters are displayed, with 3 more user options. So I don't want to do this in this version. We'll make these changes into ver 2.43, then I'll make a new branch where we can build ver 2.50 to include flex box and the options aforementioned

Comment thread index.html
setColIconsAndPresets("tBgColour");
$('body').append('<div class="modal-setting"></div>')
});
var lastHelpTarget = null;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes

Comment thread index.html
$('.guide-section').removeClass('active');
$('.mask').removeClass('active');
$('.modal-setting').remove();
lastHelpTarget = null;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes

Comment thread index.html
Comment on lines +2293 to +2307
var target = $(this).attr('href');
var guideSection = $('.guide-section');
var isOpen = guideSection.hasClass('active');

if (isOpen && target === lastHelpTarget) {
// Same button clicked again - close
guideSection.removeClass('active');
$('.mask').removeClass('active');
lastHelpTarget = null;
} else {
// Different button or not open - open/navigate
guideSection.addClass('active');
$('.mask').addClass('active');
lastHelpTarget = target;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes. I didn't actually build this section so I've never really looked at it

Comment thread index.html
e.preventDefault();
$('.guide-section').removeClass('active');
$('.mask').removeClass('active');
lastHelpTarget = null;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes

Comment thread index.html
arAlphabet = functionConfigWolfChart.YatesShuffle(arAlphabet);
//append shuffled letters to the number in the pre-shuffled line
for (i = 0; i < lineLength; i++) {
for (let i = 0; i < lineLength; i++) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes

Comment thread index.html

this.UnShuffleFunction = function (oldCharacter) {
for (i = 0; i < oldCharacter.length; i++) {
for (let i = 0; i < oldCharacter.length; i++) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

yes

Comment thread index.html
Comment thread index.html
Comment on lines -3978 to +4015
}, 5000);
}, 1000);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

No

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I may be changing my mind on this. But the cursor will always appear on mouse movement, so I wonder why it became unusable to you? Let's commit it an see what happens

Comment thread index.html
Comment on lines +4018 to +4023

// Show cursor and cancel timer when leaving chart area
chartAreas.on('mouseleave', function () {
clearTimeout(idleMouseTimer);
$("body").css('cursor', '');
});

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

No

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fair enough! I imagine you're mostly using this on a touchscreen or via keyboard where the pointer isn't relevant. On my end with a mouse, the pointer would disappear immediately and wouldn’t reappear which made it impossible for me to use. But happy to revert if you prefer the original behaviour.

@ballantynedewolf ballantynedewolf left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't really know what I;m doing here, but I think you need to roll back the changes where I've said no, and then I approve the merge?
J

Comment thread index.html
Comment on lines -1416 to +1436
<use xlink:href="#rFusedXCyl_e0" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(3,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(6,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(9,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(12,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(3,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(6,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(9,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(12,0)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -1423 to +1443
<use xlink:href="#rFusedXCyl_e0" transform="rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(0,3) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(0,6) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(0,9) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" transform="translate(0,12) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(0,3) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(0,6) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(0,9) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e0" href="#rFusedXCyl_e0" transform="translate(0,12) rotate(-90,0,0)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -1433 to +1460
<use xlink:href="#rFusedXCyl_e1" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(1.5,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(3,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(4.5,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(6,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(1.5,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(3,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(4.5,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(6,0)" />
</g>
<g id="rFusedXCylHGroup" transform="translate(7.25,11.75)">
<use xlink:href="#rFusedXCyl_e1" transform="rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(0,1.5) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(0,3) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(0,4.5) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" transform="translate(0,6) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(0,1.5) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(0,3) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(0,4.5) rotate(-90,0,0)" />
<use xlink:href="#rFusedXCyl_e1" href="#rFusedXCyl_e1" transform="translate(0,6) rotate(-90,0,0)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -1464 to +1483
<use xlink:href="#path-bg" fill="#d42c2c" />
<use xlink:href="#path-bg" fill="#2cd72c" transform="scale(1,-1) translate(0,-28)" />
<use xlink:href="#path-ring" transform="translate(7.5 17.5)" />
<use xlink:href="#path-ring" transform="translate(7.5 3.5)" />
<use xlink:href="#path-bg" href="#path-bg" fill="#d42c2c" />
<use xlink:href="#path-bg" href="#path-bg" fill="#2cd72c" transform="scale(1,-1) translate(0,-28)" />
<use xlink:href="#path-ring" href="#path-ring" transform="translate(7.5 17.5)" />
<use xlink:href="#path-ring" href="#path-ring" transform="translate(7.5 3.5)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -1470 to +1489
<use xlink:href="#path-bg" fill="#d42c2c" transform="scale(-1,1) translate(-40,0)" />
<use xlink:href="#path-bg" fill="#2cd72c" transform="rotate(180,20,14)" />
<use xlink:href="#path-box" transform="translate(25.5 3.5)" />
<use xlink:href="#path-box" transform="translate(25.5 17.5)" />
<use xlink:href="#path-bg" href="#path-bg" fill="#d42c2c" transform="scale(-1,1) translate(-40,0)" />
<use xlink:href="#path-bg" href="#path-bg" fill="#2cd72c" transform="rotate(180,20,14)" />
<use xlink:href="#path-box" href="#path-box" transform="translate(25.5 3.5)" />
<use xlink:href="#path-box" href="#path-box" transform="translate(25.5 17.5)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -1550 to +1569
<use xlink:href="#4DotDiamond" transform="translate(14.5,6.75)" />
<use xlink:href="#4DotCross" transform="translate(6,14.5)" />
<use xlink:href="#4DotCross" transform="translate(23,14.5)" />
<use xlink:href="#4DotWhiteDot" transform="translate(14.5,23)" />
<use xlink:href="#4DotDiamond" href="#4DotDiamond" transform="translate(14.5,6.75)" />
<use xlink:href="#4DotCross" href="#4DotCross" transform="translate(6,14.5)" />
<use xlink:href="#4DotCross" href="#4DotCross" transform="translate(23,14.5)" />
<use xlink:href="#4DotWhiteDot" href="#4DotWhiteDot" transform="translate(14.5,23)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines +1738 to +1753
<use xlink:href="#r4" href="#r4" transform="rotate(150 160 160)" />
<use xlink:href="#r4" href="#r4" transform="rotate(210 160 160)" />
<use xlink:href="#r4" href="#r4" transform="rotate(270 160 160)" />
<use xlink:href="#r4" href="#r4" transform="rotate(330 160 160)" />
<use xlink:href="#r5" href="#r5" />
<use xlink:href="#r5" href="#r5" transform="rotate(60 160 160)" />
<use xlink:href="#r5" href="#r5" transform="rotate(120 160 160)" />
<use xlink:href="#r5" href="#r5" transform="rotate(180 160 160)" />
<use xlink:href="#r5" href="#r5" transform="rotate(240 160 160)" />
<use xlink:href="#r5" href="#r5" transform="rotate(300 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(30 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(90 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(150 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(210 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(270 160 160)" />
<use xlink:href="#r6" href="#r6" transform="rotate(330 160 160)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -2156 to +2183
<use xlink:href="#path-shuffle-arrow" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" transform="rotate(180,2,2)" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="rotate(180,2,2)" fill="rgb(152,152,152)" stroke="none" />
<rect x="1.5" y="1.6" width="1" height="0.8" transform="rotate(-60,2,2)" fill="rgb(102,102,102)" stroke="none"></rect>
<use xlink:href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0) rotate(180,2,2)" fill="rgb(152,152,152)" />
<use xlink:href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0)" fill="rgb(152,152,152)" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0) rotate(180,2,2)" fill="rgb(152,152,152)" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0)" fill="rgb(152,152,152)" />
</g>
<g id="shuffle-button-unshuffle" display="none">
<use xlink:href="#path-shuffle-arrow" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" transform="rotate(180,2,2)" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="rotate(180,2,2)" fill="rgb(0,200,127)" stroke="none" />
<rect x="1.5" y="1.6" width="1" height="0.8" transform="rotate(-60,2,2)" fill="rgb(102,102,102)" stroke="none"></rect>
<use xlink:href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0) rotate(180,2,2)" fill="rgb(0,200,127)" />
<use xlink:href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0)" fill="rgb(0,200,127)" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0) rotate(180,2,2)" fill="rgb(0,200,127)" />
<use xlink:href="#path-shuffle-arrow" href="#path-shuffle-arrow" transform="scale(-1,1) translate(-4,0)" fill="rgb(0,200,127)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -2201 to +2222
<use xlink:href="#path-interspace-arrow" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-interspace-arrow" transform="rotate(180,2,2)" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-interspace-arrow" href="#path-interspace-arrow" fill="rgb(152,152,152)" stroke="none" />
<use xlink:href="#path-interspace-arrow" href="#path-interspace-arrow" transform="rotate(180,2,2)" fill="rgb(152,152,152)" stroke="none" />
</g>
<g id="interspace-button-on" display="none">
<use xlink:href="#path-interspace-arrow" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-interspace-arrow" transform="rotate(180,2,2)" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-interspace-arrow" href="#path-interspace-arrow" fill="rgb(0,200,127)" stroke="none" />
<use xlink:href="#path-interspace-arrow" href="#path-interspace-arrow" transform="rotate(180,2,2)" fill="rgb(0,200,127)" stroke="none" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Comment thread index.html
Comment on lines -2216 to +2242
<use xlink:href="#path-fullscreen-corner" />
<use xlink:href="#path-fullscreen-corner" transform="rotate(90,2,2)" />
<use xlink:href="#path-fullscreen-corner" transform="rotate(180,2,2)" />
<use xlink:href="#path-fullscreen-corner" transform="rotate(-90,2,2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(90,2,2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(180,2,2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(-90,2,2)" />

</g>
<g id="fullscreen-button-unfullscreen" display="none">
<use xlink:href="#path-fullscreen-corner" transform="rotate(180,1.2,1.2)" />
<use xlink:href="#path-fullscreen-corner" transform="rotate(180,2.8,1.2) rotate(90,2,2)" />
<use xlink:href="#path-fullscreen-corner" transform="translate(1.6,1.6)" />
<use xlink:href="#path-fullscreen-corner" transform="rotate(180,1.2,2.8) rotate(-90,2,2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(180,1.2,1.2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(180,2.8,1.2) rotate(90,2,2)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="translate(1.6,1.6)" />
<use xlink:href="#path-fullscreen-corner" href="#path-fullscreen-corner" transform="rotate(180,1.2,2.8) rotate(-90,2,2)" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes

Joseph and others added 2 commits February 15, 2026 00:46
Reviewer wants letter chart centering deferred to v2.50 where it
will be part of a larger flexbox/display-options rework.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jowtron

jowtron commented Feb 14, 2026

Copy link
Copy Markdown
Author

I've pushed a commit reverting the CSS vertical centering for letter charts.

I've kept the mouse cursor idle-hide behaviour in for now since you mentioned you might be changing your mind on it. The issue on my end was that the cursor would disappear immediately and not come back, making it unusable with a mouse. Also sometimes the mouse would freeze entirely and this seems to fix that too.

Everything else (bug fixes, help toggle, SVG updates) is unchanged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants