Skip to content

ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename - #1652

Open
Kasinhou wants to merge 4 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088
Open

Kasinhou wants to merge 4 commits into
customer/zcu-pubfrom
zcu-pub/fix-embargo-badge-position-1088

Conversation

@Kasinhou

@Kasinhou Kasinhou commented Oct 21, 2026 •

Copy link
Copy Markdown

What

Fixes the embargo-badge position in the ZCU-PUB item view
(dataquest-dev/dspace-customers#1088).

Each file in the Files section is a ds-file-download-link that renders the
lock icon + filename, followed by the per-bitstream access-status badge
(ds-access-status-badge → "Embargo until <date>"). The Files list separates
entries with a projected <br/> (FileSectionComponent.separator) that lands
inside the link — so the badge wrapped onto the next visual line and ran
straight into the following file's lock icon.

Behaviour

BEFORE                                        AFTER
🔒 file.zip (81 B)                            🔒 file.zip (81 B)  [Embargo until …]
[Embargo until …] 🔒  ← glued to next file    🔒 long_file_name….pdf (84 B)
long_file_name….pdf (84 B)                    [Embargo until …]   ← wraps only if it
[Embargo until …] 🔒  ← glued to next file                         doesn't fit

Each file sits on its own line, and the embargo badge stays inline right after
the filename when it fits
, dropping onto its own line under the filename only
when there isn't room. Either way the badge can no longer collide with the next
file's lock icon.

How

SCSS only, scoped to the custom theme's item-page file section — no template
duplication, so the base file-section template keeps propagating:

  • each ds-file-download-link is made block-level (one file per line);
  • the inner, projected <br/> separator is neutralised (block layout already
    breaks between files, so it would otherwise force the badge onto its own line).

The badge keeps its default inline flow, so it stays next to the filename when
there's space and wraps underneath otherwise. Because each file is its own
block, a wrapped badge can't run into the next file.

Submission (section-upload-file) and process-detail, which also reuse
ds-file-download-link, are not affected (the rule is scoped to
:host ::ng-deep .file-section).

Verification (local)

  • Backend: zcu-pub Clarin fork rebuilt from source (has the per-bitstream
    accessStatus/embargo REST endpoint), running in Docker.
  • Seeded an item with 3 embargoed + 1 open bitstream.
  • Confirmed on the seeded item: short filenames keep the badge inline on the
    same line; long filenames wrap the badge onto the next line; the open file
    shows no badge.

Fixes dataquest-dev/dspace-customers#1088

🤖 Generated with Claude Code

Matus Kasak and others added 2 commits October 21, 2026 12:13
…e filename (#1088)

The per-bitstream access-status badge ("Embargo until <date>") is rendered by
ds-file-download-link right after the download link. The item Files list
separates entries with a projected <br/> (FileSectionComponent.separator) that
lands inside the link, so the badge wrapped onto the next visual line and ran
straight into the following file's lock icon.

Scope the custom theme's item-page file section so each file is block-level and
the badge drops onto its own line directly under the filename:

    <lock> filename (size)
    Embargo until <date>

Done via SCSS only (no template duplication); submission and process-detail,
which reuse ds-file-download-link, keep their inline layout.

Fixes dataquest-dev/dspace-customers#1088

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou self-assigned this Oct 21, 2026
)

Collapse the nested rules into flat, single-level selectors and drop the
inline comments. Compiles to the same four selectors, so the rendered
layout is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Kasinhou Kasinhou changed the title ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename (#1088) ZCU-PUB/fix(item-page): drop embargo badge onto its own line under the filename Nov 4, 2026
Drop the `display: block` on the access-status badge so it flows inline
after the filename and only wraps onto its own line when it does not fit.
Each file stays block-level, so a wrapped badge still cannot collide with
the next file's lock icon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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