Skip to content

Record page / Fix wrong display of parent metadata link for series metadata - #9468

Open
josegar74 wants to merge 1 commit into
geonetwork:mainfrom
GeoCat:display-series-link-record-page
Open

Record page / Fix wrong display of parent metadata link for series metadata#9468
josegar74 wants to merge 1 commit into
geonetwork:mainfrom
GeoCat:display-series-link-record-page

Conversation

@josegar74

Copy link
Copy Markdown
Member

Test case

  1. Create a dataset metadata with hierarchy level series and title Ice series 1
  2. Create a dataset metadata with hierarchy level dataset and title Ice dataset 1 and link it to the series created in 1) --> Record page is displayed correctly
image
  1. Create a dataset metadata with hierarchy level series and title Ice series 2 and link it to the series created in 1) --> Record page is NOT displayed correctly
image

With the fix it shows up properly:

image

Root cause

Two unrelated LESS rules both nested under .gn-md-view were targeting the same generic .gallery class:

Because the record-view page wraps the title block in .gn-card, the 3-class selector beat the 2-class one on width/height, but not on float (which it never set). The mosaic ended up float: right and width: 100% with height: auto.

When the mosaic had no images (as in the Ice series 2 series record), it collapsed to a full-width, zero-height float sitting right where the "Member of" link text starts — leaving 0px on that first line, so "Ice" broke after "I" and the rest wrapped to the next line. This only happens for series/service records, since the mosaic markup is only rendered for those resource types — matching exactly why the dataset page never showed the bug.

Fix:

  • mosaic.html — give the mosaic wrapper its own gn-record-mosaic class alongside gallery.
  • gn_metadata.less — retarget the float/33%/300px rule to .gn-md-view .gn-record-mosaic.
  • gn_result_default.less — exclude the mosaic from the card-gallery rule via .gallery:not(.gn-record-mosaic).

This decouples the two independent "gallery" use cases so neither can leak into the other; the search-result card gallery is untouched, and the record-view mosaic keeps its intended float layout, which no longer squeezes the adjacent link text.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@josegar74 josegar74 added this to the 4.4.13 milestone Aug 10, 2026

@tylerjmchugh tylerjmchugh left a comment

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.

Tested, works as expected:

Image

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.

2 participants