4Science / dspace-angular

Angular UI for DSpace and DSpace-CRIS. In the dspace-cris-7 branch you can find the extension to support DSpace-CRIS
BSD 3-Clause "New" or "Revised" License
14 stars 28 forks source link

Draft: Implementation of an organization unit tree frontend #52

Closed floriangantner closed 5 months ago

floriangantner commented 1 year ago

https://github.com/4Science/DSpace/pull/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:

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!

floriangantner commented 7 months ago

aligned to 2023.02.02 Release