Skip to content

LT-22182 Add "Find" to sketch and Try a Word#480

Merged
AndyBlack merged 2 commits into
release/9.3from
LT22182
Oct 1, 2025
Merged

LT-22182 Add "Find" to sketch and Try a Word#480
AndyBlack merged 2 commits into
release/9.3from
LT22182

Conversation

@AndyBlack

@AndyBlack AndyBlack commented Sep 30, 2025

Copy link
Copy Markdown
Collaborator

This adds a Find dialog to the grammar sketch and to the various outputs of Try a Word.
This adds javascript (and a little CSS) to each web page produced by the various transforms used. The javascript and CSS code are in the new JSFunctions.xsl file.
The Find dialog is launched whenever the use keys CTL-F or right-clicks and chooses the one Find option. It allows the user to match by case and shows the number of matches. The current match is highlighted in orange; all other matches ae highlighted in yellow. It tries to center the current match in the window. It automatically wraps when the last/fist item is found and the user asks to find the next/previous match.


This change is Reviewable

Change-Id: I3daa53c57e08fc018b6334760dd3e9d057309726

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jasonleenaylor reviewed 8 of 9 files at r1, all commit messages.
Reviewable status: 8 of 9 files reviewed, all discussions resolved


Src/Transforms/Presentation/FormatXAmpleTrace.xsl line 387 at r1 (raw file):

-->
	<xsl:template name="Script">
		<script language="JavaScript" id="clientEventHandlersJS">

Nice refactor!


Src/LexText/ParserUI/TryAWordDlg.cs line 377 at r1 (raw file):

				findDialog.Show(this);
			}
			else if (e.KeyCode == 27)

There is an enum we should use here for readability. Keys.Escape I think.

Code quote:

27

Change-Id: Ia64bc9f3b01a596b2cdc346060a52a9c443f8fc0
@AndyBlack

Copy link
Copy Markdown
Collaborator Author

Thank you, Jason.
I added the enum.

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@jasonleenaylor reviewed 1 of 9 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AndyBlack)

@AndyBlack AndyBlack merged commit 617c129 into release/9.3 Oct 1, 2025
5 checks passed
@AndyBlack AndyBlack deleted the LT22182 branch October 1, 2025 15:47
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