Epic: Hierarchical View Sidebar Tab
Description of the enhancement
Adding a Vue component for vocabulary hierarchy in the sidebar.
Initial plan is to implement the component from the ground up (possibly something like this). If this doesn't work, it's also possible to use an external library like PrimeVue and its Tree component.
What new functionalities would the enhancement make possible?
- [x] 1. Basic functionality (loading correct hierarchical view, loading and showing child nodes etc)
- [x] 2. Partial page load
- [x] a. Partial page load when clicking on concepts in hierarchy
- [x] b. Moving partial page load functionality outside of alphabetical tab component
- [ ] 3. CSS
- [x] a. Correct height of sidebar
- [x] b. Scroll bar visibility and styling
- [x] c. Icons (arrows should be re-implemented using e.g. background-image)
- [x] d. Highlighting current concept
- [ ] e. Highlighting concepts coming from outside the vocabulary
- [x] f. Colors etc
- [x] g. Correct borders
- border should be removed from the children of the last concept on a level
lastclass should be set correctly on concepts with no children
- [x] h. Correct width of concepts in hierarchy (list items become narrower the deeper in the hierarchy they are, probably due to incorrect padding)
- [x] i. Resizing browser window breaks width
- [x] j. Loading spinner and correct message
- [x] k. Scrollbar visibility (in some browsers, scrollbar is shown in the middle of the sidebar before the component is loaded fully)
- [x] 4. Automatic scroll to open concept on page load
- [x] 5. Correct URLs for concepts coming from outside the vocabulary
- [x] 6. Configuration of hierarchy
- [x] a. showTopConcepts, disabling hierarchy tab (not loading top concepts unnecessarily)
- [x] b. conceptSchemesInHierarchy (Showing concept schemes instead of top concepts)
- [x] c. showNotation (Showing notation codes next to concepts)
- [x] d. sortByNotation (Sorting concepts by notation according to notation sorting style)
- [x] e. showTopConcepts, rendering hierarchy without top concepts
- [x] 7. Cypress tests
- [ ] 8. Concepts that are too low in hierarchy might not be visible even after automatic scrolling, this should be addressed in some way
- [x] 9. Sorting concepts by label according to localization
- [ ] 10. Deprecated concepts shouldn't be shown in the hierarchy (see #1143) - may require backend changes
- [ ] 11. Make sure collation works correctly in Northern Sámi (see #1420)
- [x] 12. Button for open top concept is missing when opening concept hierarchy on vocab without concept schemes in hierarchy
Saimme palautteena, että hierarkian selaaminen IPTC NewsCodesin tapauksessa on buginen Skosmos 2.17:ssa. IPTC lienee hyvä 3.0-testitapaus sanastosta, joka ei noudata tyypillistä topConcept-rakennetta.
Voisiko tab-hierarchy.js ja tab-groups.js:n ylläpidettävyyden nimissä refaktoroida niin, että vältyttäisiin tilanteilta, jotka johtavat esimerkiksi seuraaviin tapauksiin: #1390/https://github.com/NatLibFi/Skosmos/pull/1391 ? Tällöin vältyttäisiin myös duplikaattikoodilta.