Skip to content

Conversation

@klown
Copy link
Contributor

@klown klown commented Jan 18, 2026

  • This pull request has been tested by running npm test without errors
  • This pull request has been built by running npm run dev without errors
  • This isn't a duplicate of an existing pull request

Description

This pull request adds two dialogs to the adaptive-palette:

  1. SVG Entry:
  • Expand/collapse the dialog by clicking the triangle.
  • Enter an SVG builder string in the "Builder string:" text entry field,
  • Enter a label in the "Label:" text entry field,
  • Activate the "Add Symbol" button to render the symbol and label in the symbol input area.
  • Note: if the SVG builder string is invalid, no symbol is rendered in the input area, but any label text is rendered.
  1. Search gloss:
  • Enter either a word or a single BCI AV ID to search for bliss symbols in the BCI authorized vocabulary.
  • Some of the glosses in the BCI are words separated by an underscore ("_"). Include the underscore as part of the search text, e.g., "clothing_shop", not "clothing shop".
  • Activate the "Search" button. All matches found are displayed in a "matches palette".
  • Activate the "Clear" button to clear any matches palette and the search string..

In addition, a palette of matches found is produced for each successful search:

  • Each cell in this palette is live and pressing it will add the symbol and its gloss to the symbol input area.
  • The top of a cell shows the matching Bliss-word,
  • The text immediately below shows the Bliss-word's BCI AV ID and the text used to search for that symbol. For BCI AV ID searches, all Bliss-words that contain that ID are shown,
  • The text entry field on each cell allows users to change the label of the symbol that is added to the symbol input field,
  • The full decomposition of the Bliss-word is shown just below the text entry field as an SVG builder string.

Steps to test

See the "Description" above for how to use the dialogs.

klown added 30 commits March 28, 2025 11:06
Also, add `stream` (`true` or `false`) parameter to `queryChat()`
function.
- `CommandTeletgraphicCompletions` is component that calls ollama with
  a "bag of words" and a prompt to provide sentence completions
- Introduced `sentenceCompletionsSignal` that will eventually handle
  changes to the completions.
- removed all `console.debug()` statements
The palette of found symbols is a collection of cells that permit:
- ediingt a label for each symbol
- adding the symbol and its label to the input area
klown added 25 commits October 7, 2025 13:21
…e added modifier"

- based on suggestion at UX/UI meeting 02-Dec-2025

NOTE: this is hand copied from a commit on the feat/modifiers branch and should
ultimately be merged here:
affb445
- ISAAC demo branch: feat/find-by-gloss-plus-modifiers
- compromise was part of the  ISAAC demo branch:
- feat/find-by-gloss-plus-modifiers
@klown klown requested a review from cindyli January 19, 2026 15:33
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Inclusive Design Research Centre, OCAD University
* Copyright 2024-2025 Inclusive Design Research Centre, OCAD University
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright can use 2026 now. :)

options: BlissSymbolInfoType & LayoutInfoType
};

export function ActionGlossSearchCell (props: ActionGlossSearchCellPropsType): VNode {
Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed this component doesn't seem to be used anywhere except in its test. Can you double check? Thanks.

*/
function indexOfIndicatorSuffix (gloss: string): number {
let index = -1;
for (let i = 0; i < INDICATOR_SUFFIXES.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Regex might be more efficient than a loop:

const suffix_regex = new RegExp(`(${INDICATOR_SUFFIXES.join('|')})$`, 'i');
const match = gloss.match(suffix_regex);
return match ? match.index : -1;


return html`
<form onSubmit=${searchGloss} class="actionSearchGloss">
<label for=${GLOSS_ENTRY_FIELD_ID} style="color: white;">Search gloss: </label>
Copy link
Contributor

Choose a reason for hiding this comment

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

The inline style should go into .scss. Moreover, setting color explicitly may affect the auto-adaptation on various browser color theme settings.


.actionSvgEntryField {
width: 25rem;
background: white
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, setting background color explicitly may affect the adaptation to browser color theme settings.

else {
// If removing a verb indicator, try turning the word back into a "noun"
// (gerund), e.g. "walk" -> "walking".
result = doc.verbs().toGerund().text();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does removing a verb indicator turning the word back to a noun? Shouldn't "to walk" be "walk" now rather than "walking"?


// Update rows, columns, etc.
colIndex++;
if (colIndex > numCols) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If numCols is 4, this allows colIndex to be 0, 1, 2, 3, 4. Probably use if (colIndex >= numCols - 1).

columnSpan: 1
}
};
jsonPalette.cells[`${match.label}-${uuidv4()}`] = cell;
Copy link
Contributor

Choose a reason for hiding this comment

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

If makeMatchesPalette is called during a re-render, every cell will get a brand new ID with the use of uuidv4(). Every re-render will recreate the cell palette from scratch. What do you think about using bciAvId instead of calling uuidv4() so every cell palette will have a fixed key.

return html``;
}
else if (matches.length === 0) {
return html`<p style="color: white;">No matches found</p>`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Move the inline style into scss. Add a aria-live="polite" and an aria status to announce "No matches found."

* Create a JsonPaletteType from an array of matches based on a gloss search.
*
* @param {Array} glossMatches - Array of Bliss symbol information objects whose
* glass matches the search term.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "glass" -> "gloss".

@cindyli
Copy link
Contributor

cindyli commented Jan 23, 2026

The same issue with the color contrast issue in the browser dark theme as mentioned in the pull request #42.

@cindyli
Copy link
Contributor

cindyli commented Jan 23, 2026

One concern is about pushing the binary navigate.mp3 into the repository which will remain in the repo from now on even when it's removed in the future. Is it confirmed that we need this sound for navigation? I also feel there should be a better place to access binary files from the code repo.

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