Skip to content

Adds a "Content Type Browser" to the server#166

Open
bracken wants to merge 1 commit intorefactor_apifrom
add_content_type_browser
Open

Adds a "Content Type Browser" to the server#166
bracken wants to merge 1 commit intorefactor_apifrom
add_content_type_browser

Conversation

@bracken
Copy link

@bracken bracken commented Feb 5, 2026

Adds a page to browse installed libraries, depends on the API refactor PR
See attached video for functionality.

I need something like this for myself to more easily understand Libraries when working on them and I thought others would benefit as well if interested.

This PR adds:

  • src/server/apis/typeBrowser.js - new API endpoints for the Type Browser UI
    • This mostly reuses helpers from logic.js
  • assets/type_browser/* - Two pages for the browser index and viewing an individual library
  • assets/type_browser/components - The components used in the browser
    • The bulk of the lines in the PR are these components, they are fairly well composed viewers for each part of a Library
content.type.browser_.mp4

The components all work together and the index ends up with a structure like:

<h5pcli-type-browser src="/type_browser/installed_libraries">
    <h5pcli-content-type collapsed>
        <h5pcli-library-overview></h5pcli-library-overview>
        <h5pcli-semantics src="/libraries/H5P.TrueFalse-1.8/semantics.json"></h5pcli-semantics>
        <h5pcli-xapi-examples src="/type_browser/H5P.TrueFalse-1.8/xapi_examples">
            <h5pcli-xapi-viewer slot="viewer"></h5pcli-xapi-viewer>
        </h5pcli-xapi-examples>
    </h5pcli-content-type>
    <!--  repeated for each content type  -->
</h5pcli-type-browser>

Can easily browse installed types and their library and semantics
If example xAPI events are stored they can also be previewed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant