Skip to content

Render hierarchy with concept schemes#1823

Merged
UnniKohonen merged 6 commits intomainfrom
render-hierarchy-with-concept-schemes
Nov 6, 2025
Merged

Render hierarchy with concept schemes#1823
UnniKohonen merged 6 commits intomainfrom
render-hierarchy-with-concept-schemes

Conversation

@UnniKohonen
Copy link
Contributor

Reasons for creating this PR

Hierarchies are not rendered in vocabs with multiple concept schemes. This PR fixes rendering these hierarchies

Link to relevant issue(s), if any

Description of the changes in this PR

  • Add showConceptSchemesInHierarchy to SKOSMOS object
  • Render concept schemes as top concepts in vocabs with showConceptSchemesInHierarchy set to true
    • Use /{vocid}/ method when fetching top concepts on vocab home page
    • Use /{vocid}/topConcepts/ when loading children of a concept scheme after button click in hierarchy tree
    • Use /{vocid}/ when fetching top concepts on concept page
    • Use /{vocid}/topConcepts/ when opening concept scheme page to fetch its children
  • Fix getConceptURL method to work when uri space is same as current uri

Addresses requirement 6b in #1521

Known problems or uncertainties in this PR

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@UnniKohonen UnniKohonen added this to the 3.0-beta.2 milestone Nov 5, 2025
@UnniKohonen UnniKohonen requested a review from osma November 5, 2025 14:41
@UnniKohonen UnniKohonen self-assigned this Nov 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

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

Looks good. I tested this on several vocabularies with different kinds of hierarchical structures and couldn't find any obvious problems.

I noticed that there are some console.log debug messages in the JS code left. But there are some also in other JS components. I think we should aim to clean them up at some point, but that can be done a bit later...

@UnniKohonen UnniKohonen merged commit c49fc42 into main Nov 6, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this to Issue/PR closed in Skosmos 3.x Backlog Nov 6, 2025
@UnniKohonen UnniKohonen deleted the render-hierarchy-with-concept-schemes branch November 6, 2025 10:13
@osma osma moved this from Issue/PR closed to Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR, update docs) in Skosmos 3.x Backlog Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants