-
Notifications
You must be signed in to change notification settings - Fork 18
Dynamic Glossary #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Dynamic Glossary #72
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3c25a41
implemented dynamic glossary
Snooz82 dbb34ac
implemented dynamic glossary
Snooz82 92e5027
Update website/static/glossary/glossary.json
Snooz82 d6171b7
implemented glossary tooltips
Snooz82 91c3482
implemented glossary tooltips
Snooz82 3349f89
fixed typos
Snooz82 9041b67
updated glossary terms around Arguments
Snooz82 8ebbf11
Apply suggestions from code review
Snooz82 74638ac
improved css of glossary terms
Snooz82 8317d45
Optimize GlossaryTable: pre-compute sanitized HTML (#73)
Copilot c5ed31c
improved outline in dark mode
Snooz82 d648e8a
Update website/src/components/Term.tsx
Snooz82 1dedd49
Merge branch 'main' into glossary-proposal
leeuwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| id: interactive-glossary | ||
| title: Interactive Glossary | ||
| --- | ||
|
|
||
| import GlossaryTable from '@site/src/components/Glossary/GlossaryTable'; | ||
|
|
||
| Use the search boxes to filter by term or perform a fuzzy free-text search across definitions. Click any row or alias to deep-link to a glossary entry. | ||
|
|
||
| <GlossaryTable /> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 changes: 151 additions & 0 deletions
151
website/src/components/Glossary/GlossaryTable.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| .wrapper { | ||
| margin: 1.5rem 0; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 1rem; | ||
| } | ||
|
|
||
| .controls { | ||
| display: grid; | ||
| gap: 0.75rem; | ||
| grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); | ||
| } | ||
|
|
||
| .control { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 0.35rem; | ||
| font-weight: 600; | ||
| color: var(--ifm-color-primary); | ||
| } | ||
|
|
||
| .control input { | ||
| padding: 0.5rem 0.75rem; | ||
| border-radius: 0.35rem; | ||
| border: 1px solid var(--ifm-color-emphasis-300); | ||
| background: var(--ifm-background-color); | ||
| color: var(--ifm-font-color-base); | ||
| } | ||
|
|
||
| .tableWrapper { | ||
| overflow-x: auto; | ||
| border: 1px solid var(--ifm-color-emphasis-200); | ||
| border-radius: 0.5rem; | ||
| } | ||
|
|
||
| .table { | ||
| width: 100%; | ||
| border-collapse: collapse; | ||
| table-layout: fixed; | ||
| } | ||
|
|
||
| .termCol { | ||
| width: 28%; | ||
| } | ||
|
|
||
| .definitionCol { | ||
| width: 72%; | ||
| } | ||
|
|
||
|
Snooz82 marked this conversation as resolved.
Outdated
|
||
| th, | ||
| td { | ||
| padding: 0.85rem 1rem; | ||
| text-align: left; | ||
| vertical-align: top; | ||
| } | ||
|
|
||
| th { | ||
| background: var(--ifm-color-emphasis-100); | ||
| font-size: 0.95rem; | ||
| letter-spacing: 0.01em; | ||
| } | ||
|
|
||
| tr:nth-child(even) { | ||
| background: var(--ifm-table-stripe-background); | ||
| } | ||
|
|
||
| tbody tr { | ||
| scroll-margin-top: 72px; /* leave space for sticky header */ | ||
| } | ||
|
|
||
| .activeRow { | ||
| outline: 2px solid var(--ifm-color-primary); | ||
| outline-offset: -2px; | ||
| background: var(--ifm-color-emphasis-100); | ||
| } | ||
|
|
||
| .termCell { | ||
| min-width: 180px; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .clickable { | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| .termName { | ||
| margin-bottom: 0.25rem; | ||
| } | ||
|
|
||
| .definitionCell { | ||
| width: 100%; | ||
| } | ||
|
|
||
| .emptyState { | ||
| text-align: center; | ||
| padding: 1rem; | ||
| color: var(--ifm-color-emphasis-700); | ||
| } | ||
|
Snooz82 marked this conversation as resolved.
Outdated
|
||
|
|
||
| .definitionText > :first-child { | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| .definitionText > :last-child { | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| .pillRow { | ||
| display: flex; | ||
| gap: 0.4rem; | ||
| flex-wrap: wrap; | ||
| margin-top: 0.5rem; | ||
| } | ||
|
|
||
| .pill { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 0.25rem; | ||
| padding: 0.15rem 0.6rem; | ||
| border-radius: 999px; | ||
| font-size: 0.8rem; | ||
| border: 1px solid var(--ifm-color-emphasis-300); | ||
| background: var(--ifm-color-emphasis-100); | ||
| color: var(--ifm-font-color-base); | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .pill:hover, | ||
| .pill:focus-visible { | ||
| border-color: var(--ifm-color-primary); | ||
| color: var(--ifm-color-primary); | ||
| } | ||
|
|
||
| .abbreviationPill { | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| .aliasPill { | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .aliasLink { | ||
| color: var(--ifm-color-primary); | ||
| text-decoration: underline; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .aliasLink:hover, | ||
| .aliasLink:focus-visible { | ||
| color: var(--ifm-color-primary-darker); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.