Skip to content

Conversation

@Snooz82
Copy link
Member

@Snooz82 Snooz82 commented Dec 5, 2025

This PR implements a dynamic glossary with search and alias.
The glossary is stored in a JSON file (website/static/glossary/glossary.json), so that the glossary definition can be used by dynamic glossary tool tips in all MarkDown documents.

2025-12-06_00-21-54.mp4

I implemented the glossary terms to be hovered and a dynamic glossary.

The glossary is based on a json file.

	{
		"term": "Named-Only Argument",
		"aliasses": ["Named Argument"],
		"abbreviation": "",
		"definition": "An argument that must be provided by name (never positionally); typically defined after a \"Variable Number of Positional Arguments\" or explicitly marked with a label icon in docs, and can be mandatory or optional."
	},

the usage is like this in Markdown:

Except for "Positional-Only Arguments", which are not part of this syllabus,
all arguments that are positioned before :term[Variable Number of Positional Arguments], :term[Named-Only Arguments]{term="Named-Only Argument"}, or :term[Free Named Arguments]{term="Free Named Argument"} in the argument interface of a keyword are :term[Positional or Named Arguments]{term="Positional or Named Argument"}.

so either if the exact term is used:

:term[Variable Number of Positional Arguments]

or in case a different grammatical form is used:

:term[Named-Only Arguments]{term="Named-Only Argument"}

Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <snooz@posteo.de>
@Snooz82 Snooz82 added this to the 1.0.2 milestone Dec 5, 2025
@Snooz82 Snooz82 self-assigned this Dec 5, 2025
@Snooz82 Snooz82 requested review from a team and Copilot December 5, 2025 19:13
@Snooz82 Snooz82 added the enhancement New feature or request label Dec 5, 2025
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Signed-off-by: René <snooz@posteo.de>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

@Snooz82
Copy link
Member Author

Snooz82 commented Dec 5, 2025

2025-12-06_00-21-54.mp4

I implemented the glossary terms to be hovered and a dynamic glossary.

The glossary is based on a json file.

	{
		"term": "Named-Only Argument",
		"aliasses": ["Named Argument"],
		"abbreviation": "",
		"definition": "An argument that must be provided by name (never positionally); typically defined after a \"Variable Number of Positional Arguments\" or explicitly marked with a label icon in docs, and can be mandatory or optional."
	},

the usage is like this in Markdown:

Except for "Positional-Only Arguments", which are not part of this syllabus,
all arguments that are positioned before :term[Variable Number of Positional Arguments], :term[Named-Only Arguments]{term="Named-Only Argument"}, or :term[Free Named Arguments]{term="Free Named Argument"} in the argument interface of a keyword are :term[Positional or Named Arguments]{term="Positional or Named Argument"}.

so either if the exact term is used:

:term[Variable Number of Positional Arguments]

or in case a different grammatical form is used:

:term[Named-Only Arguments]{term="Named-Only Argument"}

Signed-off-by: René <snooz@posteo.de>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 20 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • website/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Signed-off-by: René <snooz@posteo.de>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 20 changed files in this pull request and generated 9 comments.

Files not reviewed (1)
  • website/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</thead>
<tbody>
{filteredEntries.map((entry) => {
const definitionHtml = sanitizeMarkdown(entry.definition, purify);
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

sanitizeMarkdown is called inside the render loop for every filtered entry on every render, which is inefficient. Consider computing the sanitized HTML once when creating the entries (in the useMemo at line 45-85) and storing it in the DisplayEntry type, or memoize this computation separately to avoid re-parsing and re-sanitizing markdown on every render.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

{open && hasTooltip && portalReady
? createPortal(
<div
role="dialog"
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

The dialog tooltip is missing an accessible label. Consider adding aria-label or aria-labelledby to the dialog div to improve screen reader experience. For example: aria-label={Definition of ${trigger || children}} would help screen reader users understand what the dialog contains.

Suggested change
role="dialog"
role="dialog"
aria-label={`Definition of ${trigger ?? children}`}

Copilot uses AI. Check for mistakes.
Signed-off-by: René <snooz@posteo.de>
Copy link

@hassineabd hassineabd Dec 6, 2025

Choose a reason for hiding this comment

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

I think the new glossary table have resolved most of existing problems: like definining test suite as test suite file , ( suite vs suite file vs directory ) ,,, user keyword vs library keyword vs Keywod in general

but, i see that the current version miss some of term that have been existing before ( is this intentional ) :
Settings Section
Variables Section
Test Cases Section
Tasks Section
Keywords Section
Comments Section

Also , I have identified two kewords that are not defined : Rebot & Libdoc ( already added on slack glossary table actually, it looks like there were existing and we just lost them after the edit )

Copy link
Member Author

Choose a reason for hiding this comment

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

rebot and libdoc are only mentioned a hand full of times together with the explantation. So imho no definition for those nedded.

not sure how we should define the Settings Section
Open for proposals.

Copy link

Copilot AI commented Dec 7, 2025

@Snooz82 I've opened a new pull request, #73, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Signed-off-by: René <snooz@posteo.de>
- [x] Revert to useMemo approach for entries and aliasToCanonicalSlug
- [x] Remove unnecessary purifyRef and purifyReady state
- [x] Simplify sanitization logic while maintaining security
- [x] Ensure proper SSR handling
- [x] Test and validate changes (TypeScript passes, dev server runs)
- [x] Clean up build artifacts from repository
- [x] Code review and security checks passed (CodeQL found no issues)

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Snooz82 <41592183+Snooz82@users.noreply.github.com>
Co-authored-by: René <snooz@posteo.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Signed-off-by: René <snooz@posteo.de>
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 7, 2025

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants