Skip to content
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

Draft: Implementation of an organization unit tree frontend #52

Conversation

floriangantner
Copy link

@floriangantner floriangantner commented Sep 6, 2023

4Science/DSpace#383

References

Add references/links to any related issues or PRs. These may include:

Description

Shows node inside some tree and additional metrics as some standalone explore section element.

Screenshot 2023-09-06 at 13-47-06 DSpace at My University Explore section

Screenshot 2023-09-06 at 13-46-04 DSpace at My University Explore section

Instructions for Reviewers

Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers.

List of changes in this PR:

  • cris layout section component for showing the tree
  • component for showing node of the trees.
  • data service for fetching treenode and corresponding models. These are extending DSpaceObjects to have cached Objects.

The display of the icons and metrics badges can be configured in the configuration in the new introduced TreeRenderingConfig
The config is usable for multiple trees, so the tree can be named in treeRendering.entries.treename. For every entity in the tree (mostly OrgUnit) some specific item can be configured in treeRendering.entries.entityicons.

For every node metrics configured in the orgunittree.xml file the icon can be configured in treeRendering.entries.renderings with the shortname of the metrics as the key. The optional value treeRendering.entries.renderings.hidezero can be used to hide metric badged which have the value zero. Some additional treeRendering.entries.renderings.tooltip can be specified to show some tooltip hovering above the metric badges.

treeRendering: TreeRenderingConfig = {
    entries: [
      {
        treename: 'orgunittree',
        entityicons: [
          {
            key: 'OrgUnit',
            icon: 'fa-landmark'
          }
        ],
        renderings: [
          {
            key: 'publications',
            icon: 'fa-book',
          },
          {
            key: 'publicationsaggregated',
            icon: 'fa-book',
            hidezero: true,
            tooltip: 'orgunittree.metrics.tooltip',
          },
...

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@floriangantner floriangantner changed the base branch from dspace-cris-7 to main-cris February 20, 2024 16:54
@floriangantner
Copy link
Author

aligned to 2023.02.02 Release

@floriangantner floriangantner changed the base branch from main-cris to dspace-cris-2023_02_x April 15, 2024 10:24
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.

WIP: organization unit tree
1 participant