Skip to content

[DSpace-CRIS] Configurable Layout of Entity/Item pages - #5963

Open
FrancescoMolinaro wants to merge 26 commits into
DSpace:mainfrom
4Science:task/main/DURACOM-507
Open

FrancescoMolinaro wants to merge 26 commits into
DSpace:mainfrom
4Science:task/main/DURACOM-507

Conversation

@FrancescoMolinaro

@FrancescoMolinaro FrancescoMolinaro commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

References

Issue: DSpace/DSpace#11779
Backend: DSpace/DSpace#12789

Description

The Dynamic layout (ex CRIS layout) allows to manage the visualization and access to the item data in a more fine-grain way than the default DSpace.

The layout is organized in an excel file and the item information is organized over two levels, tabs and boxes. Each tab can contain one or more boxes organized in a sort of grid composed by rows and cells. The same box can be eventually shared between multiple tabs with a specific order in each tab. A box represents the minimal unit of information about an item that can be visualized and protected.

If an entity type is not defined in the excel file the default DSpace layout is displayed.

Basic examples:

image image image

Vertical and horizontal Layout

It is possible to have a main leading tab always visible and to organize the remaining tabs with a layout having two different orientations : vertical and horizontal. In the horizontal layout the tabs are arranged inside a top navbar, while in the vertical one they are arranged within a lateral sidebar.

Only tabs and boxes that contain data visible to the current user are listed. If a tab only contains boxes without visible data or that are flagged as minor, such tab is not listed at all.

In both vertical and horizontal layout when only one tab is available sidebar and navbar are not displayed.

It’s possible to use one of the two layout (vertical or horizontal) differently depending on the type of entity. To select the layout, the DSpace angular application provide an itemPage settings under the layout property in the environment file (src/environments/environment.common.ts), e.g.

itemPage: { Person: { orientation: 'horizontal' }, default: { orientation: 'vertical' }, },

Tab grid system

In order to have a more flexible way to arrange boxes within a tab a grid system is used. The grid system uses a series of rows and cells to layout and align boxes, following these rules :

  • Every row can contains one or more cells

  • Every cell can contain one or more boxes

  • All cells inside the same row are displayed one next to the other

  • All boxes inside the same cell are displayed one below the other

Example:

image

Tab and Box models

The tabs are represented by the org.dspace.layout.DynamicLayoutTab java class and exposed in the REST layer via the org.dspace.app.rest.model.DynamicLayoutTabRest. The boxes are represented by the org.dspace.layout.DynamicLayoutBox java class and exposed in the REST layer via the org.dspace.app.rest.model.DynamicLayoutBoxRest and org.dspace.app.rest.model.DynamicLayoutBoxConfigurationRest. The later one, in particular, is the extension point to plug the different types of boxes in the platform.

Tabs and Boxes are bound to a specific Entity Type and share the following attributes:

  • shortname. It is an alias of the Id used to refer to the tab / box from configuration files, without the need to hardcode the database generated Id

  • label. It is the label, or the i18n key, to use to present the section to the user. In case you want to use the header as a translation key, the complete i18n key used by the system has the prefix layout.tab.header. for the tab, and layout.box.header. for the box

  • security. It can have one of the following values:

0 → public. Everyone can access the data contained in the tab (if the security is not overridden by the box security), or box

1 → administrator. Only system administrator can access the data

2 → owner only. Only the owner of the item can access the data. Please note that the concept of item owner is specific of DSpace-CRIS and it is different from the submitter. The item owner is defined by the dspace.object.owner metadata

3 → owner and administrator. Only the owner of the item and the system administrator can access the data

4 → custom policy. The list of people and groups that can access the data are defined in other metadata of the item itself. The metadata to use are defined in the securityMetadata attribute that contains a list of reference to metadata fields that are expected to be configured with the EPersonAuthority or GroupAuthority

  • leading. It can be true or false. If true, the tab is shown on the top of the item’s page and remains there even if the user browse the other tabs

  • priority. Attribute that is used to sort them in ascending order

  • rows. It contains the configuration of the grid used to display boxes beloging to the current tab. Each row is composed by cells that contains the list of boxes. Boxes have a specific order inside each cell that include them.

  • container. It can be true or false. If true, the box is show as a collapsible panel, otherwise it has no container and is always visible

  • collapsed. When true, and box container property is set to true, the box panle start collapsed, and the user need to open it to see the actual data

  • minor. It is true when the box should not be used to determine if a tab actually has content or not

  • style. It is added to the CSS classes of the generated html element that contains the tab or box to allow further customization via CSS

Nested tabs

It’s possible to have two or more tabs grouped by the same top menu entry. In this case the tab entries are displayed with a dropdown in the sidebar and navbar .

image

To configure the nested two or more tabs, the shortname property and label may contain the parent and child tabs concatenated by ::.

Following the previous example where we have two tabs, publications and fundigs, grouped by a the top level tab outputs , the configuration is like :

shortname -> label

outputs::publications -> Outputs::Publications

When relating boxes to nested tab, the shortname of the tab to use must include also the top level ( e.g. outputs::publications).

Box types

The most simple and used is named METADATA.
A metadata box is a collection of item metadata fields and selection criteria over the item bitstreams, organized in rows, each of which can contain one or more fields. Three types of fields exist (metadata and bitstream), their additional configuration options are exposed in an attribute with the same name than the fieldType:

  • METADATA. The field holds the values stored in an item metadata identified with the .[.] syntax that is exposed in the metadata attribute

  • METADATAGROUP. The field holds the values stored in a group of nested metadata identified with the .[.] syntax that is exposed in the metadata attribute

  • BITSTREAM. The field holds the bitstreams in a specific item bundle optionally matching a specific value for a metadata.

  • IIIFVIEWER. The field holds an embedded Mirador viewer. This is showed only if the metadata dspace.iiif.enabled is set to true.

The bitstream attribute is an object containing the:

  • bundle, the name of the bundle

  • metadataField and metadataValue, optional, the value of a specific bitstream metadata that will be used to filter which bitstreams are included in the field. If the metadataValue start with a ! the filter become negative (only return bitstreams that don’t match the criteria). It is also possible specify a regex puting the metadataValue between bracket (...regex...), or a negative regex !(...regex...)

Regardless to the fieldType, each field has the following attributes:

  • label. The textual label or i18n key to use as label for the field. In case you want to use the header as a translation key, the complete i18n key used by the system has the prefix layout.field.header.

  • rendering. The rendering strategy for the field. Examples are heading, text, longtext, dynamicref, identifier, date, link etc. for metadata field, and preview, thubmnail for bitstream field

  • styleLabel. The style attribute allows to set arbitrary css styles to the metadata’s label

  • styleValue. The style attribute allows to set arbitrary css styles to the metadata’s value

  • labelAsHeading. If true, the metadata value is displayed below the metadata label. If false, metadata value is displayed along the metadata label

  • valuesInline. If true, when a metadata has multiple values, they are displayed one along the others. If false, they are displayed one below the others

Another type of box present is the RELATION box.

This box is bound to a DiscoveryConfiguration that can be parameterized with the uuid of the item. The defaultFilterQueries of the DiscoveryConfiguration can contains the placeholder {0} that will be replaced at runtime with the uuid of the item. Please refer to next paragraph for further details about how to set and configure such queries.

Discovery queries are configured via discovery.xml file (/config/spring/api/discovery.xml) , in org.dspace.discovery.configuration.DiscoveryConfigurationService bean. A map’s entry for each relation is provided, standard pattern for key is RELATION... Entity and relationName must match to what reported in xls file, box sheet, ‘ENTITY’ and ‘SHORTNAME’ entries for each relation. For example, RELATION.Project.researchoutputs identifies the relation that will be used to populate 'researchoutupts' box configured in excel file for entity 'Project'.

The core part of DiscoveryConfiguration, for relation’s set up is defaultFilterQueries. This section contains one or more filter queries to be performed, given Item’s uuid, to find linked Items. In case many filter queries are provided, such queries are executed in sequence: the second query filters first query’s results and so on.

This is the query that retrieves projects related to a person: projectinvestigators_authority:{0}, where {0} is a placeholder for UUID of the person. In case of inverse relations, queries are more complex and a subquery is needed. For exampl,e this is the query that finds Projects belonging to every person affiliated to an OrgUnit, given OrgUnit UUID: '{'!join from=search.resourceid to=projectinvestigators_authority fromIndex=search'}'person.affiliation.name_authority:{0}.

Another type of box available is the COLLECTIONS box.

The COLLECTIONS box shows the owning collection of an item, and all mapped collections:
It is possible to customise the appearance of this box through the property collectionsBox in the default.app.config.ts.

image

Box grid system

In a very similar way to what we have for tabs, the grid system is used also to locate metadata within a metadata box. The grid system uses a series of rows and cells to layout and align metadata, following these rules:

  • Every row can contains one or more cells

  • Every cell can contain one or more metadata

  • All cells inside the same row are displayed one next to the other

  • All metadata inside the same cell are displayed one below the other

Rendering Types

The rendering types are different ways of displaying the metadata to the user, each of them is connected to a different UI component and offers a different functionality.
The available types are descripted in the following table:

Field type Subtypes Description
heading — Heading field.
text — Text field.
longtext — Long text field.
link label, email Supports a clickable URL or email address. To add a label to a URL, use [Link label](URL) with the link.label rendering. To add a clickable email address, insert the email address in the field with the link.email rendering.
date — Date field.
bcdate — Used for BCE dates; renders negative years showing "B.C." for negative dates. (GLAM only).
identifier hdl, doi, scopus, researcherid, mailto, ror Identifier field supporting common persistent identifier types.
dynamicref first3.last1 Used for long author lists.
thumbnail — Thumbnail field.
attachment — Attachment field.
advancedattachment — Advanced attachment field.
tag — Tag field.
valuepair <value_pairs_name> or <vocabulary_name> Renders values from a configured value pair or vocabulary.
orcid — ORCID field.
table METADATAGROUP Table field rendered from a metadata group.
inline METADATAGROUP Inline field rendered from a metadata group.
authoritylink — Renders personal links with labels.
html — Renders the field content as HTML, displaying the full text.
longhtml — Renders the field content as HTML, truncating long text with a Show more button.
cclicense METADATAGROUP Renders the license as a clickable badge.
cclicensefull METADATAGROUP Renders the license as a clickable badge with extended license details displayed alongside it.
openstreetmap METADATAGROUP Renders metadata of the group as a geospatial map, using the OpenStreetMap library. Point values are WKT POINT strings (e.g. 'POINT(lng lat)'). Bounding box values use a different format (e.g. '{westlimit=..., southlimit=..., ...}').

Security of the metadata

The dynamic layout allows a more granular control of the security. It is possible to configure which metadata are available to different users. Out of box the dynamic layout behavior mimic the one implemented by DSpace, metadata are generally available to any user (anonymous) with the only exception of the metadata listed in the configuration files with the key metadata.hide..[.] = true

When the dynamic layout defines tabs or boxes that have a limited access the metadata used in these tabs / boxes are checked in details and a user will be able to retrieve them via API, so in the UI, only if the user has the right to access such metadata via at least one box. This mean that metadata not used in the dynamic layout are generally public but can still be restricted to the administrators using the metadata.hide. configuration keys.

A special project named preventMetadataSecurity exists to skip the evaluation of the granular security logic where appropriate. This is the case when a large number of items are retrieved to show just a limited amount of data that are known to be not controversial. Indeed, if the client specify this projection in the REST request only the metadata listed under the configuration key metadata.publicField are returned without wasting time in further check . This mean that using such projection also authorized users are unable to retrieve potential sensible data.

The dynamic layout goes a step further and other than providing a granular security at the level of individual metadata field it is also able to define a further access rule to decide which individual metadata values are visible to a specific user.

This is configured in the metadata-security.cfg file where this feature can be enabled for all the metadata or a specific subset, defining the default configuration (usually no further restriction as in a basic DSpace) for metadata that are not explicitly mentioned. The exact meaning of the different metadata value security level is defined in the spring-dspace-security-metadata.xml file and by default offer

  • level 0: everyone (that is granted to see the metadata field)
  • level 1: member of the group “Trusted” (can be configured)
  • level 2: administrators.

Dynamic Layout Tool Sheets

The Dynamic Layout configuration is organized into multiple sheets. Each sheet defines a specific aspect of the UI layout.

tab

Defines all tabs that should be created.

Column Description
Entity Label of the Entity Type to which the tab belongs. A tab's Shortname must be unique within the entity. This column can also contain a custom filter (see the Custom Filter section).
Shortname Unique identifier of the tab, used by other sheets and configuration.
Label Human-readable tab name or an i18n key (see i18n conventions).
Priority Tabs are ordered by ascending priority.
Leading y or n. If y, the tab remains fixed at the top of the item page while browsing other tabs. If no tab is marked as leading, all tabs are placed below the page header and the details section scrolls out of view.
Security Defines who can access the tab.

box

Defines all boxes displayed within tabs. Boxes are rendered in the order they appear.

Column Description
Entity Label of the Entity Type to which the box belongs. A box's Shortname must be unique within the entity. This column can also contain a custom filter.
Collapsed y or n. When y, the box is initially collapsed in the default theme.
Container y or n. When y, the box is rendered with its surrounding panel and title.
Type Box type. Available values are listed in the utilsdata sheet.
Shortname Unique identifier of the box.
Label Human-readable name or i18n key.
Minor y or n. Minor boxes are ignored when determining whether a tab contains visible content.
Security Defines who can access the box.
Style Extra UI styling information. In the default theme this becomes CSS classes (for example col-md-6).

tab2box

Associates boxes with tabs.

Column Description
Entity Used together with Tab to reference the tab sheet.
Tab References the tab Shortname.
Boxes Comma-separated list of box Shortname values defined in the box sheet.
Row Row where the boxes are placed. Boxes sharing the same row appear side by side.
Row_style Style applied to the row. Rows with the same number should use the same style.
Cell_style Style applied to the cell containing the boxes.

box2metadata

Configures metadata boxes and the fields they display.

Column Description
Entity References the entity.
Box References the box Shortname.
Row Row where the field is displayed.
Cell Cell within the row where the field is displayed.
Row_style Style applied to the row.
Cell_style Style applied to the cell.
FieldType Field type (METADATA, BITSTREAM, or METADATAGROUP).
Metadata Metadata key.
Value For BITSTREAM fields only, filters bitstreams by metadata value.
Bundle For BITSTREAM fields only, filters by bundle. Since versions 2023.02.08, 2024.02.02, and 2025.01.00, two bundles can be specified using <VIEW_BUNDLE>.<DOWNLOAD_BUNDLE> (for example ORIGINAL.BRANDED_PREVIEW).
Label Human-readable label or i18n key.
Rendering Custom rendering strategy for the field.
Style CSS classes applied to the field container.
Style_label CSS classes applied to the label.
Style_value CSS classes applied to the value.
Label_as_heading y or n. When y, the label is displayed above the value.
Values_inline y or n. When y, multiple values are shown inline; otherwise each value appears on a separate line.

metadatagroups

Defines nested metadata rendered as grouped fields.

Column Description
Entity Entity Type label.
Parent Parent metadata field. It must also exist in box2metadata with FieldType = METADATAGROUP.
FieldType Always METADATA.
Metadata Metadata key.
Value For BITSTREAM fields only, filters bitstreams by metadata value.
Bundle For BITSTREAM fields only, bundle filter. Supports <VIEW_BUNDLE>.<DOWNLOAD_BUNDLE> syntax.
Label Human-readable label or i18n key.
Rendering Custom rendering strategy.
Style_label CSS classes for the label.
Style_value CSS classes for the value.

tabpolicy and boxpolicy

Provide additional configuration for tabs and boxes using CUSTOM DATA security.

Column Description
Entity References the entity.
Shortname References the tab or box.
Metadata Metadata key (for example cris.policy.group) containing the users or groups allowed to access the tab or box.
Group Alternative to Metadata. Access is granted if the current user belongs to the specified group.
Alternative_to Name of the tab or box displayed when access to the configured one is denied.

utilsdata

This sheet is not processed by the tool.

It exists only as a reference to help populate the configuration workbook.


tab_i18n, box_i18n, metadata_i18n, metadatagroup_i18n

Contain i18n translations.

See the i18n conventions section for details.


Configuration Loading Process

The tool performs the following operations in order, stopping immediately if an error occurs:

  1. Validate the Excel configuration file, reporting inconsistencies such as:
    • Undefined entity types
    • Undefined metadata
    • Missing tabs or boxes referenced by association sheets
    • Other configuration errors
  2. Completely remove the existing Dynamic Layout configuration.
  3. Load the new configuration.

Instructions for Reviewers

To import the layout you can ran the following script:

./dspace dynamic-layout-tool -f ../etc/conftool/dynamic-layout-configuration.xls

or from the process page in the UI you can select the dynamic-layout-import script.

To test the functionality you can try and start by configuring one of the entity type available in DSpace and check that the dynamic layout work properly.

A basic layout of example can be found in the rest codebase under the name dynamic-layout-configuration.xls or attached to this PR.

dynamic-layout-configuration.xls

Some examples from the test layout:

Publication:

image

Journal:

image

OrgUnit

image

Project

tab-1

image

tab-2

image

The i18n tabs in the excel are come with a function to generate labels based on a prefix, to do so you just need to drag the AUTOGENERATED I18N keys columns.
The labels can then be copied over to the json file in the UI project in case translations or customizations are needed.

For the e2e tests the issue is that many of the new endpoint are missing from the e2e container, so it would be best to fix them after the rest are merged.

List of changes in this PR:

Added new resolver to check whether tabs are available and dynamic layout can be loaded.
Added new decorators and static map for handling and parsing of tabs, boxes and rendering types.
Ported components for rendering types visualization.
Implemented layout matrix and loader components.
Ported UI configurations for layout elements customization.
Ported different boxes components.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • 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 npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run 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.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • 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.

FrancescoMolinaro and others added 5 commits July 9, 2026 14:44
Remove DynamicLayoutConfig nesting and move urn, itemPage, metadataBox,
and collectionsBox properties directly under the layout interface to
eliminate unnecessary nesting levels.

Changes:
- Update layout-config.interfaces.ts: Remove DynamicLayoutConfig interface
  and add urn, itemPage, metadataBox, collectionsBox directly to LayoutConfig
- Update default-app-config.ts: Move dynamicLayout properties to top level
- Update environment.test.ts: Move dynamicLayout properties to top level
- Update component property access from layout.dynamicLayout.* to layout.*:
  * dynamic-layout-loader.component.ts
  * dynamic-layout-collection-box.component.ts
  * metadata-container.component.ts
  * resolver-strategy.service.ts
  * identifier.component.ts
- Update config.example.yml: Flatten structure and enhance documentation

Before:
  layout.dynamicLayout.urn
  layout.dynamicLayout.itemPage
  layout.dynamicLayout.metadataBox
  layout.dynamicLayout.collectionsBox

After:
  layout.urn
  layout.itemPage
  layout.metadataBox
  layout.collectionsBox

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xt menu was, add min width for dynamic thumbnail component
@FrancescoMolinaro FrancescoMolinaro added the DSpace-CRIS merger This ticket/PR relates to the merger of DSpace-CRIS into DSpace. label Jul 16, 2026
@FrancescoMolinaro FrancescoMolinaro added this to the 11.0 milestone Jul 16, 2026
@lgeggleston lgeggleston moved this to 🙋 Needs Reviewers Assigned in DSpace 11.0 Release Jul 16, 2026
@FrancescoMolinaro
FrancescoMolinaro marked this pull request as ready for review July 23, 2026 15:44
@tdonohue
tdonohue requested review from artlowel and tdonohue July 30, 2026 16:07
Comment on lines +66 to +69
const urlWithoutQuery = state.url.split('?')[0];
const urlSplit = urlWithoutQuery.split(route.params.id);
const tabArguments = urlSplit[1]?.split('/');
const givenTab = tabArguments?.[1];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not use the route parameter directly instead of parsing the URL?
const givenTab = route.params.tab ? /${route.params.tab} : undefined;

Since src/app/item-page/item-page-routes.ts already defines:

    {
        path: ':tab',
        component: ThemedItemPageComponent,
        resolve: {
          tabs: dynamicItemPageTabResolver,
        },
      },

it is way cleaner

@alexandrevryghem alexandrevryghem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@FrancescoMolinaro: Thnx for this PR! I haven't tested the functionality yet, but I already took a quick look over the code changes and left some inline comments.

Based on the code, it also looks like the geospatial metadata field isn't supported yet. Is this something that would be in scope for this PR, or would you prefer to address it in a separate follow-up PR?

Comment thread src/app/core/shared/metadata.models.ts Resolved
Comment thread src/app/core/layout/tab-data.service.ts Resolved
@github-project-automation github-project-automation Bot moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 11.0 Release Aug 3, 2026
@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @Emil-Domagala-pcg , @alexandrevryghem , many thanks for the feedback and the reviews, I have updated the code trying to address all yours suggestions, this should be now ready for testing or a second review.
@alexandrevryghem regarding the geospatial support I am not sure it is in scope for this PR but I will have to check with the rest of the team, I will let you know as soon as possible.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem, many thanks for the review, I have tried to address all your feedback but for some of them I would like to kindly ask you if you could provied the xlsx you used so that I can pinpoint the problems.
Unfortunately, for some reason, I can't download the one you attached.

Regarding the issue with the double leading tab there should be an error thrown on the backend during the import, as it should be at most one, but i see that this validation is missing, @AdamF42 we should add it to avoid inconsistency.

For the rows spacing instead I didn't add any additional space as it should be possible to customize that via the excel file, in the box2metadata sheet you can add space through the ROW_STYLE column (for classes applied on the whole row) or through the CELL_STYLE column (for classes applied on each individual cell).

I believe in the same way the spacing/alignment of the heading rendering can be adjusted to fit the necessity:

image

In this example I have just added the rendering to a text metadata in the sample layout and the alignment should be fine.

I am aware some of the points you mentioned are still open but I will look forward to the excel file you used to be more precise in addressing the problems, thanks in advance for the support and the help in reviewing this PR.

@AdamF42

AdamF42 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@FrancescoMolinaro, @alexandrevryghem, I've updated the import script to reject .xls layouts with the double leading tab per entity type.

@alexandrevryghem alexandrevryghem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@FrancescoMolinaro: I can still download that file that I uploaded on GitHub, so I uploaded it to my Google Drive in the hope that you can download that file from there 🤞

I also already took a quick look at the latest changes and I noticed that the files tab is now overflowing outside of the container.

Image

Regarding the styling, I think those changes I mentioned should be the default way the component is rendered, and if people want to change the layout of the title field to not be aligned with the other fields, they could use ROW_STYLE /CELL_STYLE to modify it like that.

Regarding issue 3 from my last comment, if you prefer keeping the 2 rows stuck to each other, could you ensure that:

  • Only the first row has rounded corners at the top
  • Only the last one has rounded corners at the bottom
  • That there isn't a double border between 2 rows

This would make it clearer that the rows belong together (see the health panel as an example)

In mobile mode the navbar is now rendering correctly, but it's overflowing to the right:
Image

@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem many thanks for your feedback, much appreciated, I was also able to download the excel file this time, thanks for it.
I tried addressing all your feedback and correct the layout issues you pointed out, the only thing that I didn't tackle is the title alignement, I believe the odd alignement comes from the difference of that row setup compared to the other ones.
As I noticed in your layout is the only row with two cells, but it still keeps a label styling as the other row (class col-3 in the STYLE_LABEL column).
To prevent the spacing difference you can use a simple "col" class for the label and get a result as follows:

Entity Type Tab Row Cell Box Type Field Label Value1 Rendering Value2 Style
Publication main 1 1 METADATA dc.title Title n heading n font-weight-bold col
image

Since this spacing issue stems from the configuration rather than the components' base styling, I held off on making changes. Please let me know if you'd prefer I address it anyway.

@alexandrevryghem alexandrevryghem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@FrancescoMolinaro: Thnx, since the title is aligned correctly when we only use one cell, and that you can fix it with those styles I think it's indeed fine to leave that one as is

After tweaking that stylesheet from my previous comment a little bit to test the new changes I noticed the following 2 improvements:

  • That fix for the rounded corners & duplicate lines between boxes currently doesn't work well when the first box is hidden for example (tested this with an IIIF box as the first bow). When you add a margin bottom it would also be nice if it would automatically restore the rounded borders. To fix this I would do something like this to automatically apply rounded corners when needed:
    • Remove the border-top: 0 from dynamic-layout-matrix.component.scss this will always show the border, and we will hide that duplicate border using negative margin bottom
    • Create these new CSS classes: .layout-rounded-top, .layout-rounded-bottom, .layout-connected-bottom {margin-bottom: -1px;}
    • Create a new dsRoundedDynamicLayoutMatrix directive and add it here
    • Implement the directive to apply these classes on the current element:
      • .layout-rounded-top: In case the previousElementSibling has a margin bottom OR if there is no previous sibling
      • .layout-rounded-bottom: In case the nextElementSibling has a margin top OR if there is no next sibling
      • .layout-connected-bottom: In case there is a next sibling, the current element has no margin bottom and if the next sibling has margin top
  • By default there should be a space between the leading tab and the navbar (only when the leading tab is visible for the current user):
Image

Using this configuration I noticed the following issues:

  • The title & score overflow outside of the container due to the mx-n2 on the left box
    Image
  • The navbar doesn't work when the first tab is an expandable tab, in that case it just renders a blank navbar (until you manually navigate to an existing route). The best fix would be to automatically navigate to the first tab you can access, but if this is too complicated, we could leave that tab blank, but I would at least fix the navbar
  • The nested tab dropdown doesn't close properly when you are already on that page
  • The nested tab toggle and the options from the dropdown use the same ID, which causes an accessibility issue
  • The expandable navbar looks a little bit weird right new. There is more space at the left side of each option compared to right side, the hover effect uses rounded borders, and currently there is no clear visible separation between the dropdown and the text it hovers over. For the last one I would apply the same shadow effect as the one from the main navbar
    Image
  • My accessibility tool also flagged the colors that you were using for having insufficient text contrast so I would go with a darker color
  • Sometimes I still get into this infinite loading state:
    Image

I also noticed there is support for HTML in LonghtmlComponent, but this does not offer the same functionalities as the dsMarkdown pipe, we should maybe create a new FieldRenderingType for Markdown/MathJax as well. This can however be done in a follow-up PR

@AdamF42: I think that fix you made might accidentally have broken the custom filters on tab level. I did add the dspace.metadata.layout.tab = dc.type property to my configuration but it fails to import that sheet with the following error: "The sheet tab contains more than one leading tab for entity type 'Publication' at rows [2, 3, 4]. Only one leading tab per entity type is allowed"

[row]="row"
[item]="item"
[box]="box"
class="row py-2">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This py-2 should not be added when there are no metadata fields

…namic layout boxes, minor restyle, fix some accessibility issues with dynamic layout navbar, fix issue with nested tabs loading
@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem many thanks for the review! I believe I've addressed all of your feedback, so the PR should hopefully be ready for another look.
Regarding the missing support for markdown content, I'll get in touch with @AdamF42 to decide whether we add it in this PR or in a separate one. I'll let you know as soon as we've reached a decision.
As for the loading error you encountered, I wasn't able to reproduce it. That said, I did fix a JS error in the tabs component, so it may well have been caused by that. If you run into the error again, could you please check whether there are any other outstanding errors in the console, or whether you had imported a particular configuration for the layout? Many thanks in advance for your help!

@tdonohue tdonohue mentioned this pull request Oct 9, 2026
6 of 9 tasks
@alexandrevryghem

Copy link
Copy Markdown
Member

@FrancescoMolinaro: Thnx! I'll try to take another look next week, and I remember checking the console and there weren't any errors. Something I also forgot to mention in my last comment was that the IIIF build failed on the this branch, could you check if you also have the same error (I tested it on the main, and I wasn't able to reproduce it there, so might be a simple sync)

@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem, thanks for the check, i have aligned the branch with main and now the mirador build seems to be working properly.

@alexandrevryghem alexandrevryghem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@FrancescoMolinaro: Thnx for the updates! I've tested the new changes and tested some new scenarios and found the following possible improvements/issues:

  • I have been trying to test out that new change with the rounded corners, but it currently doesn't work with this file: 01-publication-minimal.xlsx (in case you can't download it I simply added mb-4 d-block to the first box from the leading tab). From what I can see, it looks like box styles are applied in the tabbed layout. In addition think the dsRoundedDynamicLayoutMatrix might need to be moved on the ds-dynamic-layout-box-container tag. Since dsRoundedDynamicLayoutMatrix also only works on real siblings you could fix it by adding an @Input() roundedDynamicLayoutMatrixSiblingsSelector: string on that directive. When a value is provided, the results of this selector will be used to find the sibling instead of the previousElementSibling
  • The sheet linked in the PR description fails to import (dynamic-layout-configuration.xls)
  • Could you add some additional explanation on what the minor/configuration columns properties do
  • I can't get the relation & versioning boxes to work with this sheet (01-publication-minimal.xlsx).
  • I noticed that the following LayoutBox types don't have decorators, they should either be removed or those components should be created: SEARCH, ORCID_SYNC_SETTINGS & ORCID_SYNC_QUEUE

…versioning box issue with missing item, clean up
@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem many thanks for the feedback! I have addressed the issue on the directive and the problem with the versioning box, those should be working now.
For the relation box I have checked the excel you provided and I think you are missing the discovery configuration for that box, for the content check the rest use the following key to match the related configuration:

RELATION.entity.boxShortname

So to make your box work you'll need to add the following mapping in the discovery.xml:

<entry key="RELATION.Publication.relations" value-ref="personOrOrgunit"/>

Regarding the "configuration" column, that was an old reference that we had in CRIS for some excel to keep note about the configuration of box, is ignored by the rest and not in use anymore also in CRIS so I removed it from the description.
The "minor" column instead is used to flag boxes that should be ignored in the determination of the tab visualization, for instance if you have a tab with only minor boxes that would be considered an hidden tab, is it used to avoid rendering a tab if the less important content is the only one visible.
I'have also replaced the layout in the description since was uploaded at the beginning of the work and was now outdated and not working (wrong metadata).

Thanks again, I will look forward to your next feedback!

@alexandrevryghem

Copy link
Copy Markdown
Member

Until now I have mostly tested the layout with the boxes, but for my next review round I wanted to use the excel sheets to recreate the default vanilla layout, but when I import the sheet linked in the PR the process fails could one of you take a look dynamic-layout-configuration.xls (I just tested it again with the latest changes)

Sheets with multiple leading tabs based on the dc.type value also still don't work since this fix (even though dspace.metadata.layout.tab = dc.type is present in my local.cfg)
image

@FrancescoMolinaro

FrancescoMolinaro commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem , thanks for the feedback, I think the layout you linked in your comment is stil the old one (file 30261260), the new one in the description is the following: https://github.com/user-attachments/files/33672982/dynamic-layout-configuration.xls.

For the leading tab issue I will have a look with @AdamF42 and tackle the problem, it should be possible to define different leading tabs based on the dc.type.

@AdamF42

AdamF42 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Until now I have mostly tested the layout with the boxes, but for my next review round I wanted to use the excel sheets to recreate the default vanilla layout, but when I import the sheet linked in the PR the process fails could one of you take a look dynamic-layout-configuration.xls (I just tested it again with the latest changes)

Sheets with multiple leading tabs based on the dc.type value also still don't work since this fix (even though dspace.metadata.layout.tab = dc.type is present in my local.cfg) image

Hi @alexandrevryghem, I pushed a fix on the backend side to support multiple leading tabs by dc.type, so a layout can define a distinct leading tab per scope (e.g. Publication.journal,
Publication.book, and a bare Publication fallback). Your sheet should be imported fine now.

If they still don't show at runtime, check the config property dynamic.layout.tab.metadata, in your comment was dspace.metadata.layout.tab, so the routing is skipped. Rename it and retry.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Hi @FrancescoMolinaro,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@alexandrevryghem alexandrevryghem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sry for the delayed review, I tested the layout with the provided te scheet and found the following issues with that default config:

  1. Container issues for the DSO edit menu & the sidebar
    image
  2. The admin sidebar button is also partially hidden behind the sidebar (but I guess this will be fixed together with issue 1, unless the sidebar should always render outside the container on desktop view?)
    image
  3. On pages without admin sidebars the DSO edit menu is also stuck against the breadcrumbs please use the same amount of spacing as with the box layout
    image
  4. The "Back to results" button is missing on pages that have been customized with this feature
    image

@FrancescoMolinaro

Copy link
Copy Markdown
Contributor Author

Hi @alexandrevryghem , many thanks for the review, I have fixed the issue with the missing container and spacing, for the back button I have added a directive that mimicks the default item page behavior so the components should be aligned.
I will look forward to your next review and thanks again for the help on this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DSpace-CRIS merger This ticket/PR relates to the merger of DSpace-CRIS into DSpace. high priority new feature

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

7 participants