-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add infinite scrolling to alphabetical index #1624
Conversation
resource/js/tab-alpha.js
Outdated
<div class="sidebar-list" :style="getListStyle()" ref="list"> | ||
<template v-if="loadingConcepts"> | ||
<div> | ||
Loading... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a value from the window.SKOSMOS object, e.g. "Ladataan sisältöä", "Laddar mera resultat" & "Loading more items". Also if you want to use a spinner, something like <i class="fa-solid fa-spinner fa-spin-pulse"></i>
could be considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's worth adding more translations to the SKOSMOS object, because the translation mechanism for the frontend may still change to something completely different that doesn't rely on the SKOSMOS object (e.g. reading the translations directly from a JSON file). See #1525 and #1523 (comment) for some thoughts
resource/js/tab-alpha.js
Outdated
@@ -147,9 +194,12 @@ tabAlphaApp.component('tab-alpha', { | |||
:href="getConceptURL(concept.uri)" @click="loadConcept($event, concept.uri)" | |||
>{{ concept.prefLabel }}</a> | |||
</li> | |||
<template v-if="loadingMoreConcepts"> | |||
Loading... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here as on L183
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works well now! A minor thing, but I'd get rid of the hardcoded loading message at this point already.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Reasons for creating this PR
Alphabetical index does not load more concepts as it's scrolled. This PR adds functionality to address this.
Link to relevant issue(s), if any
Description of the changes in this PR
SKOSMOS
variableAddresses requirement 2 in #1563
Known problems or uncertainties in this PR
Checklist
.sr-only
class, color contrast)